Module: WizAcl::AroModel::InstanceMethods

Defined in:
lib/wizdog/acl/ext/aro_model.rb

Instance Method Summary collapse

Instance Method Details

#allow(acos = "*", operations = "*") ⇒ Object



27
28
29
# File 'lib/wizdog/acl/ext/aro_model.rb', line 27

def allow(acos = "*", operations = "*")
  Acl.instance.allow(self, acos, operations)
end

#allowed?(acos = "*", operation = "*") ⇒ Boolean

Returns:

  • (Boolean)


35
36
37
# File 'lib/wizdog/acl/ext/aro_model.rb', line 35

def allowed?(acos = "*", operation = "*")
  Acl.instance.allowed?(self, acos, operation) || Acl.instance.allowed?(self.class.name, acos, operation)
end

#aro_idObject



23
24
25
# File 'lib/wizdog/acl/ext/aro_model.rb', line 23

def aro_id
  "#{self.class.name}_#{id}"
end

#deny(acos = "*", operations = "*") ⇒ Object



31
32
33
# File 'lib/wizdog/acl/ext/aro_model.rb', line 31

def deny(acos = "*", operations = "*")
  Acl.instance.allow(self, acos, operations)
end

#find_entriesObject



39
40
41
# File 'lib/wizdog/acl/ext/aro_model.rb', line 39

def find_entries
  Acl.instance.find_entries_by_aro(self)
end