Class: Lanes::Access::Roles::Administrator
Constant Summary
Lanes::Access::Role::ALL
Class Method Summary
collapse
Instance Method Summary
collapse
all_available, grant, grant_global_access, inherited, #initialize, lock, lock_writes
Class Method Details
.grant_global_access! ⇒ Object
8
9
10
11
12
13
14
15
16
17
|
# File 'lib/lanes/access/roles/administrator.rb', line 8
def self.grant_global_access!
self.grant( *Lanes::Model.descendants )
LockedFields.definitions.each do | klass, fields |
fields.each do |field, grants|
grants.push({ role: self, only: nil })
end
end
end
|
Instance Method Details
#can_delete?(model) ⇒ Boolean
28
29
30
|
# File 'lib/lanes/access/roles/administrator.rb', line 28
def can_delete?(model)
true
end
|
#can_read?(model) ⇒ Boolean
20
21
22
|
# File 'lib/lanes/access/roles/administrator.rb', line 20
def can_read?(model)
true
end
|
#can_write?(model) ⇒ Boolean
24
25
26
|
# File 'lib/lanes/access/roles/administrator.rb', line 24
def can_write?(model)
true
end
|