Module: Arsecurity
Defined Under Namespace
Modules: ClassMethods
Constant Summary collapse
- CREATE =
'create'
- READ =
'read'
- UPDATE =
'update'
- DELETE =
'delete'
Instance Method Summary collapse
- #rinter_create_around(invocation) ⇒ Object
- #rinter_delete_around(invocation) ⇒ Object
- #rinter_update_around(invocation) ⇒ Object
Instance Method Details
#rinter_create_around(invocation) ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/arsecurity.rb', line 15 def rinter_create_around(invocation) if ArsecurityUtil.(CREATE, invocation.object.class.name, invocation.object, invocation) return invocation.invoke else raise ArsecurityNotAuthorizedException end end |
#rinter_delete_around(invocation) ⇒ Object
22 23 24 25 26 27 28 |
# File 'lib/arsecurity.rb', line 22 def rinter_delete_around(invocation) if ArsecurityUtil.(DELETE, invocation.object.class.name, invocation.object, invocation) return invocation.invoke else raise ArsecurityNotAuthorizedException end end |
#rinter_update_around(invocation) ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/arsecurity.rb', line 8 def rinter_update_around(invocation) if ArsecurityUtil.(UPDATE, invocation.object.class.name, invocation.object, invocation) return invocation.invoke else raise ArsecurityNotAuthorizedException end end |