Merge remote-tracking branch 'parent/main' into upstream-20241216
This commit is contained in:
commit
3784ad273c
555 changed files with 7564 additions and 3363 deletions
23
app/policies/terms_of_service_policy.rb
Normal file
23
app/policies/terms_of_service_policy.rb
Normal file
|
@ -0,0 +1,23 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class TermsOfServicePolicy < ApplicationPolicy
|
||||
def index?
|
||||
role.can?(:manage_settings)
|
||||
end
|
||||
|
||||
def create?
|
||||
role.can?(:manage_settings)
|
||||
end
|
||||
|
||||
def distribute?
|
||||
record.published? && !record.notification_sent? && role.can?(:manage_settings)
|
||||
end
|
||||
|
||||
def update?
|
||||
!record.published? && role.can?(:manage_settings)
|
||||
end
|
||||
|
||||
def destroy?
|
||||
!record.published? && role.can?(:manage_settings)
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue