Module: WizAcl::AcoModel::InstanceMethods

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

Instance Method Summary collapse

Instance Method Details

#aco_idObject



12
13
14
# File 'lib/wizdog/acl/ext/aco_model.rb', line 12

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

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



16
17
18
# File 'lib/wizdog/acl/ext/aco_model.rb', line 16

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

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

Returns:

  • (Boolean)


24
25
26
# File 'lib/wizdog/acl/ext/aco_model.rb', line 24

def allowed?(aros = "*", operation = "*")
  Acl.instance.allowed?(aros, self, operation)
end

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



20
21
22
# File 'lib/wizdog/acl/ext/aco_model.rb', line 20

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

#find_entriesObject



32
33
34
# File 'lib/wizdog/acl/ext/aco_model.rb', line 32

def find_entries
  Acl.instance.find_entries_by_aco(self)
end

#remove_allow(aros = "*", operations = "*") ⇒ Object



28
29
30
# File 'lib/wizdog/acl/ext/aco_model.rb', line 28

def remove_allow(aros = "*", operations = "*")
  Acl.instance.remove_allow(aros, self, operations)
end