alego 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/alego.rb +16 -15
- data/lib/alego/version.rb +1 -1
- metadata +1 -1
data/lib/alego.rb
CHANGED
@@ -45,23 +45,24 @@ module Alego
|
|
45
45
|
|
46
46
|
protected
|
47
47
|
def valida_tela
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
if
|
52
|
-
|
48
|
+
begin
|
49
|
+
nome = controller_name
|
50
|
+
|
51
|
+
if session[:usuario_corrente]
|
52
|
+
|
53
|
+
usuario = session[:usuario_corrente]
|
54
|
+
recursos = usuario.recursos.split(";")
|
55
|
+
recursos.each do |recurso|
|
56
|
+
if (nome == recurso)
|
57
|
+
return true
|
58
|
+
end
|
59
|
+
danied
|
60
|
+
end
|
53
61
|
else
|
54
|
-
|
62
|
+
danied
|
55
63
|
end
|
56
|
-
|
57
|
-
|
58
|
-
usuario = session[:usuario_corrente]
|
59
|
-
recursos = usuario['recursos'].split(";")
|
60
|
-
recursos.each do |recurso|
|
61
|
-
if (nome == recurso)
|
62
|
-
return true
|
63
|
-
end
|
64
|
-
denied
|
64
|
+
rescue
|
65
|
+
danied
|
65
66
|
end
|
66
67
|
end
|
67
68
|
|
data/lib/alego/version.rb
CHANGED