Add ability to email announcements to all users (#33928)
This commit is contained in:
parent
d2ce9a6064
commit
5a100bf38f
20 changed files with 275 additions and 11 deletions
|
@ -16,4 +16,8 @@ class AnnouncementPolicy < ApplicationPolicy
|
|||
def destroy?
|
||||
role.can?(:manage_announcements)
|
||||
end
|
||||
|
||||
def distribute?
|
||||
record.published? && !record.notification_sent? && role.can?(:manage_settings)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue