johnsbrn-has_permission 0.2.2 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION.yml +1 -1
- data/lib/permission/base.rb +3 -3
- metadata +1 -1
data/VERSION.yml
CHANGED
data/lib/permission/base.rb
CHANGED
@@ -28,7 +28,7 @@ module Permission
|
|
28
28
|
if can_write?(name)
|
29
29
|
object.update_attribute(name, value)
|
30
30
|
else
|
31
|
-
raise PermissionException.new
|
31
|
+
raise PermissionException.new("#{user} does not have permission to access #{name} on #{object}")
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
@@ -52,7 +52,7 @@ module Permission
|
|
52
52
|
if can_read?(attr_name)
|
53
53
|
object.read_attribute(attr_name)
|
54
54
|
else
|
55
|
-
raise PermissionException.new
|
55
|
+
raise PermissionException.new("#{user} does not have permission to access #{attr_name} on #{object}")
|
56
56
|
end
|
57
57
|
end
|
58
58
|
|
@@ -60,7 +60,7 @@ module Permission
|
|
60
60
|
if can_write?(attr_name)
|
61
61
|
object.write_attribute(attr_name, value)
|
62
62
|
else
|
63
|
-
raise PermissionException.new
|
63
|
+
raise PermissionException.new("#{user} does not have permission to access #{attr_name} on #{object}")
|
64
64
|
end
|
65
65
|
end
|
66
66
|
|