Class: Locomotive::AccountPolicy
Instance Attribute Summary
#membership, #resource
Instance Method Summary
collapse
#destroy_all?, #edit?, #initialize, #new?, #persisted?, #site_admin?, #site_admin_or_designer?, #site_staff?, #super_admin?
Instance Method Details
12
13
14
15
|
# File 'app/policies/locomotive/account_policy.rb', line 12
def create?
true
end
|
21
22
23
24
|
# File 'app/policies/locomotive/account_policy.rb', line 21
def destroy?
super_admin? && !owner?
end
|
4
5
6
|
# File 'app/policies/locomotive/account_policy.rb', line 4
def index?
super_admin?
end
|
8
9
10
|
# File 'app/policies/locomotive/account_policy.rb', line 8
def show?
super_admin? || owner?
end
|
17
18
19
|
# File 'app/policies/locomotive/account_policy.rb', line 17
def update?
(super_admin? || owner?) && !@resource.visitor?
end
|