defcon 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/controllers/defcon/sessions_controller.rb +10 -5
- data/lib/defcon/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 161fb69475843f33f98d875a7b3411f6da2b9488
|
4
|
+
data.tar.gz: 17b25ebff6f55cb867259e9ff283caa084ea08b8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9f197dee0330dad4495537055adb8c4295bb73c2791828b10d01c4bc08165bf42f2d50d937eb13a665faf2071e63a1cafd86a1823eac8265f28c416cb2518523
|
7
|
+
data.tar.gz: 1f2f4eb8dbfdf32899d54b154e99b7ca5a3fa3b34648afec4db907e84e72f8feb047419cd312d2e5d5ab0a5a41bd4ed3485eb28241bbb8b472a0969581599686
|
@@ -15,7 +15,8 @@ module Defcon
|
|
15
15
|
admin.save
|
16
16
|
session[:admin_id] = admin.id
|
17
17
|
session[:admin_username] = admin.username
|
18
|
-
|
18
|
+
flash[:notice] = "Welcome back!"
|
19
|
+
redirect_to defcon_welcome_path
|
19
20
|
else
|
20
21
|
if !admin.nil?
|
21
22
|
admin.attempts = admin.attempts + 1
|
@@ -25,21 +26,24 @@ module Defcon
|
|
25
26
|
if !admin.nil? && admin.locked_out?
|
26
27
|
message = "Locked out!"
|
27
28
|
end
|
28
|
-
|
29
|
+
flash[:alert] = message
|
30
|
+
redirect_to defcon_login_path
|
29
31
|
end
|
30
32
|
end
|
31
33
|
|
32
34
|
def destroy
|
33
35
|
session[:admin_id] = nil
|
34
36
|
session[:admin_username] = nil
|
35
|
-
|
37
|
+
flash[:notice] = "Until next time!"
|
38
|
+
redirect_to defcon_login_path
|
36
39
|
end
|
37
40
|
|
38
41
|
private
|
39
42
|
|
40
43
|
def logged_in_check
|
41
44
|
if !logged_in?
|
42
|
-
|
45
|
+
flash[:alert] = "You are not logged in."
|
46
|
+
redirect_to defcon_login_path
|
43
47
|
return false
|
44
48
|
else
|
45
49
|
return true
|
@@ -48,7 +52,8 @@ module Defcon
|
|
48
52
|
|
49
53
|
def logged_out_check
|
50
54
|
if logged_in?
|
51
|
-
|
55
|
+
flash[:alert] = "You are already logged in."
|
56
|
+
redirect_to defcon_welcome_path
|
52
57
|
return false
|
53
58
|
else
|
54
59
|
return true
|
data/lib/defcon/version.rb
CHANGED