Module: Arsecurity::ClassMethods

Defined in:
lib/arsecurity.rb

Instance Method Summary collapse

Instance Method Details

#rinter_delete_around(invocation) ⇒ Object



44
45
46
47
48
49
50
# File 'lib/arsecurity.rb', line 44

def rinter_delete_around(invocation)
  if ArsecurityUtil.authorized?(DELETE, invocation.object.name, nil, invocation)
    return invocation.invoke
  else
    raise ArsecurityNotAuthorizedException
  end
end

#rinter_read_around(invocation) ⇒ Object



37
38
39
40
41
42
43
# File 'lib/arsecurity.rb', line 37

def rinter_read_around(invocation)
  if ArsecurityUtil.authorized?(READ, invocation.object.name, nil, invocation)
    return invocation.invoke
  else
    raise ArsecurityNotAuthorizedException
  end
end

#rinter_update_around(invocation) ⇒ Object



30
31
32
33
34
35
36
# File 'lib/arsecurity.rb', line 30

def rinter_update_around(invocation)
  if ArsecurityUtil.authorized?(UPDATE, invocation.object.name, nil, invocation)
    return invocation.invoke
  else
    raise ArsecurityNotAuthorizedException
  end
end