Merge remote-tracking branch 'parent/main' into upstream-20241216

This commit is contained in:
KMY 2024-12-16 10:14:31 +09:00
commit 3784ad273c
555 changed files with 7564 additions and 3363 deletions

View 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