Class: Locomotive::ContentTypePolicy
Instance Attribute Summary
#membership, #resource
Instance Method Summary
collapse
#edit?, #initialize, #new?, #persisted?, #site_admin?, #site_admin_or_designer?, #site_staff?, #super_admin?
Instance Method Details
8
9
10
|
# File 'app/policies/locomotive/content_type_policy.rb', line 8
def create?
site_admin_or_designer?
end
|
16
17
18
|
# File 'app/policies/locomotive/content_type_policy.rb', line 16
def destroy?
site_admin_or_designer?
end
|
#destroy_all? ⇒ Boolean
20
21
22
|
# File 'app/policies/locomotive/content_type_policy.rb', line 20
def destroy_all?
site_admin_or_designer?
end
|
28
29
30
|
# File 'app/policies/locomotive/content_type_policy.rb', line 28
def import?
@resource.import_enabled?
end
|
4
5
6
|
# File 'app/policies/locomotive/content_type_policy.rb', line 4
def index?
site_staff?
end
|
24
25
26
|
# File 'app/policies/locomotive/content_type_policy.rb', line 24
def show?
site_admin_or_designer? || !@resource.hidden?
end
|
12
13
14
|
# File 'app/policies/locomotive/content_type_policy.rb', line 12
def update?
site_admin_or_designer?
end
|