Class: SettingsPolicy
Constant Summary
ApplicationPolicy::STANDARD_EDIT_PERMISSIONS, ApplicationPolicy::STANDARD_VIEW_PERMISSIONS
Instance Attribute Summary
#record, #user
Instance Method Summary
collapse
#create?, #destroy?, #destroy_all?, #edit?, #index?, #initialize, #new?
Instance Method Details
#analysis? ⇒ Boolean
6
7
8
|
# File 'app/policies/settings_policy.rb', line 6
def analysis?
update?
end
|
#appearance? ⇒ Boolean
10
11
12
|
# File 'app/policies/settings_policy.rb', line 10
def appearance?
update?
end
|
#derivatives? ⇒ Boolean
14
15
16
|
# File 'app/policies/settings_policy.rb', line 14
def derivatives?
update?
end
|
#discovery? ⇒ Boolean
32
33
34
|
# File 'app/policies/settings_policy.rb', line 32
def discovery?
update?
end
|
#integrations? ⇒ Boolean
36
37
38
|
# File 'app/policies/settings_policy.rb', line 36
def integrations?
update?
end
|
#multiuser? ⇒ Boolean
18
19
20
|
# File 'app/policies/settings_policy.rb', line 18
def multiuser?
update?
end
|
#reporting? ⇒ Boolean
22
23
24
|
# File 'app/policies/settings_policy.rb', line 22
def reporting?
update?
end
|
#show? ⇒ Boolean
2
3
4
|
# File 'app/policies/settings_policy.rb', line 2
def show?
update?
end
|
#update? ⇒ Boolean
26
27
28
29
30
|
# File 'app/policies/settings_policy.rb', line 26
def update?
one_of(
user&.is_administrator?
)
end
|