lockdown 1.0.2 → 1.0.3
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.
- data/lib/lockdown.rb +1 -1
- data/lib/lockdown/rules.rb +1 -1
- metadata +2 -2
data/lib/lockdown.rb
CHANGED
data/lib/lockdown/rules.rb
CHANGED
|
@@ -330,7 +330,7 @@ module Lockdown
|
|
|
330
330
|
end
|
|
331
331
|
# Need to make sure we find the model first before checking admin status.
|
|
332
332
|
return true if current_user_is_admin?
|
|
333
|
-
unless
|
|
333
|
+
unless @#{model.name}.#{model.model_method}.#{model.association}(#{model.controller_method})
|
|
334
334
|
raise SecurityError, "Access to #\{action_name\} denied to #{model.name}.id #\{@#{model.name}.id\}"
|
|
335
335
|
end
|
|
336
336
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: lockdown
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Andrew Stone
|
|
@@ -9,7 +9,7 @@ autorequire:
|
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
11
|
|
|
12
|
-
date: 2009-07-
|
|
12
|
+
date: 2009-07-21 00:00:00 -04:00
|
|
13
13
|
default_executable:
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|