incline 0.2.19 → 0.2.20
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/app/models/incline/action_security.rb +11 -10
- data/lib/incline/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: f8de1c05a56d8fa74b9dc2e62f97e6d29e469e8b
|
4
|
+
data.tar.gz: be927fbe2f1b71f7c856bd469ee2cf2f178f82df
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d37abcda2c3b81dffd271e44dc7c0569bde5b3806986ed88d64734b8f9d9f7958fdf1771c4456913f1b711c8f2a1481772971b00d29f014aa54e8296f024736
|
7
|
+
data.tar.gz: 984cf5809f336af74ca23a3558433a223f947db3018f8eed2610ca522953c419769e50776bdd8efa8cebbed5c306d685ddf99f0dbda570495ea8e67d69f6b910
|
data/Gemfile.lock
CHANGED
@@ -78,13 +78,13 @@ module Incline
|
|
78
78
|
# remove all paths and set all items to hidden.
|
79
79
|
Incline::ActionSecurity.update_all(visible: false, path: '#')
|
80
80
|
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
81
|
+
Incline
|
82
|
+
.route_list
|
83
|
+
.reject{|r| %w(api locate).include?(r[:action]) }
|
84
|
+
.each do |r|
|
85
|
+
|
86
86
|
item = ActionSecurity.find_or_initialize_by(controller_name: r[:controller], action_name: r[:action])
|
87
|
-
|
87
|
+
|
88
88
|
# ensure the current path is set to the item.
|
89
89
|
item_path = "#{r[:path]} [#{r[:verb]}]"
|
90
90
|
if item.path == '#' || item.path.blank?
|
@@ -94,14 +94,15 @@ module Incline
|
|
94
94
|
elsif !item.path.include?(item_path)
|
95
95
|
item.path += "\n" + item_path
|
96
96
|
end
|
97
|
-
|
97
|
+
|
98
98
|
# re-sort the path list and make the item visible.
|
99
99
|
item.path = item.path.split("\n").sort.join("\n")
|
100
100
|
item.visible = true
|
101
|
-
|
101
|
+
|
102
102
|
item.save!
|
103
|
-
|
104
|
-
|
103
|
+
end
|
104
|
+
|
105
|
+
ret = Incline::ActionSecurity.where(visible: true).to_a.sort do |a,b|
|
105
106
|
if a.controller_name == b.controller_name
|
106
107
|
a.action_name <=> b.action_name
|
107
108
|
else
|
data/lib/incline/version.rb
CHANGED