DEV: Trigger an event when a user is granted admin or moderation. (#17663)
This commit is contained in:
parent
517e2f7dc4
commit
5a0480efd7
|
@ -35,6 +35,7 @@ module Roleable
|
|||
auto_approve_user
|
||||
enqueue_staff_welcome_message(:moderator)
|
||||
set_default_notification_levels(:moderators)
|
||||
DiscourseEvent.trigger(:staff_granted, self, :moderator)
|
||||
end
|
||||
|
||||
def revoke_moderation!
|
||||
|
@ -47,6 +48,7 @@ module Roleable
|
|||
auto_approve_user
|
||||
enqueue_staff_welcome_message(:admin)
|
||||
set_default_notification_levels(:admins)
|
||||
DiscourseEvent.trigger(:staff_granted, self, :admin)
|
||||
end
|
||||
|
||||
def revoke_admin!
|
||||
|
|
Loading…
Reference in New Issue