Class: Ditty::AuditLogPolicy
Defined Under Namespace
Classes: Scope
Instance Attribute Summary
#record, #user
Instance Method Summary
collapse
#initialize
Instance Method Details
#create? ⇒ Boolean
7
8
9
|
# File 'lib/ditty/policies/audit_log_policy.rb', line 7
def create?
false
end
|
#delete? ⇒ Boolean
23
24
25
|
# File 'lib/ditty/policies/audit_log_policy.rb', line 23
def delete?
false
end
|
#list? ⇒ Boolean
11
12
13
|
# File 'lib/ditty/policies/audit_log_policy.rb', line 11
def list?
user&.super_admin?
end
|
#permitted_attributes ⇒ Object
27
28
29
|
# File 'lib/ditty/policies/audit_log_policy.rb', line 27
def permitted_attributes
%i[action details]
end
|
#read? ⇒ Boolean
15
16
17
|
# File 'lib/ditty/policies/audit_log_policy.rb', line 15
def read?
user&.super_admin?
end
|
#update? ⇒ Boolean
19
20
21
|
# File 'lib/ditty/policies/audit_log_policy.rb', line 19
def update?
false
end
|