arsecurity 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +3 -0
- data/Rakefile +1 -1
- data/lib/arsecurity_util.rb +2 -2
- metadata +2 -2
data/CHANGELOG
CHANGED
data/Rakefile
CHANGED
data/lib/arsecurity_util.rb
CHANGED
@@ -18,7 +18,7 @@ class ArsecurityUtil
|
|
18
18
|
permissions.each do |permission|
|
19
19
|
permission = ArsecurityPermission.new(permission) if permission.is_a?(Hash)
|
20
20
|
next if permission.target_class_name != target_class_name
|
21
|
-
|
21
|
+
if permission.operation.present?
|
22
22
|
next if permission.operation != operation
|
23
23
|
end
|
24
24
|
#instance not nil mean persist
|
@@ -66,7 +66,7 @@ class ArsecurityUtil
|
|
66
66
|
def has_permission(permission, operation, target_class_name, instance)
|
67
67
|
return false if permission.target_class_name != target_class_name
|
68
68
|
|
69
|
-
|
69
|
+
if permission.operation.present?
|
70
70
|
return false if permission.operation != operation
|
71
71
|
end
|
72
72
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: arsecurity
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Leon Li
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-06-25 00:00:00 +08:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|