access_manager 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/access_manager/rules.rb +8 -8
- data/lib/access_manager/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: 71d67851f3222a13cc9c73a036a9113c4938a050
|
4
|
+
data.tar.gz: c8cea65c4b197524cf8c3094a07d5a454c16efd4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bddac2278bf8b534d468e290dc05712ea487af39cc5146d50330079e19ce2040bfca38f934f045d87f13a70a1645306bf0da0cb190b586efd4eb2f4ce3c75524
|
7
|
+
data.tar.gz: 5b096128d64e5c11677b7dca6f4074844deaf98bc606ad7ad7eed041637d7048c9c6360b5cc8e11bb38dcf19749d1f263f4eb83e33a8a5af51fca984ada6bcab
|
data/CHANGELOG.md
CHANGED
data/lib/access_manager/rules.rb
CHANGED
@@ -8,23 +8,23 @@ module AccessManager
|
|
8
8
|
end
|
9
9
|
|
10
10
|
args[:to].each do |controller, actions|
|
11
|
-
if @access_tree[controller].nil?
|
12
|
-
@access_tree[controller] = { }
|
11
|
+
if @access_tree[controller.to_sym].nil?
|
12
|
+
@access_tree[controller.to_sym] = { }
|
13
13
|
end
|
14
14
|
|
15
15
|
if actions == :all
|
16
|
-
if @access_tree[controller]['@all'].nil?
|
17
|
-
@access_tree[controller]['@all'] = []
|
16
|
+
if @access_tree[controller.to_sym]['@all'].nil?
|
17
|
+
@access_tree[controller.to_sym]['@all'] = []
|
18
18
|
end
|
19
19
|
|
20
|
-
@access_tree[controller]['@all'] << user_action
|
20
|
+
@access_tree[controller.to_sym]['@all'] << user_action
|
21
21
|
else
|
22
22
|
actions.each do |action|
|
23
|
-
if @access_tree[controller][action].nil?
|
24
|
-
@access_tree[controller][action] = []
|
23
|
+
if @access_tree[controller.to_sym][action.to_sym].nil?
|
24
|
+
@access_tree[controller.to_sym][action.to_sym] = []
|
25
25
|
end
|
26
26
|
|
27
|
-
@access_tree[controller][action] << user_action
|
27
|
+
@access_tree[controller.to_sym][action.to_sym] << user_action
|
28
28
|
end
|
29
29
|
end
|
30
30
|
end
|