mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 16:34:31 +08:00
Add ability for admins and mods to send another activation email to a user, to activate an account, and deactivate an account
This commit is contained in:
@ -21,7 +21,10 @@ class AdminUserSerializer < BasicUserSerializer
|
||||
:banned_at,
|
||||
:banned_till,
|
||||
:is_banned,
|
||||
:ip_address
|
||||
:ip_address,
|
||||
:can_send_activation_email,
|
||||
:can_activate,
|
||||
:can_deactivate
|
||||
|
||||
def is_banned
|
||||
object.is_banned?
|
||||
@ -62,4 +65,16 @@ class AdminUserSerializer < BasicUserSerializer
|
||||
SiteSetting.must_approve_users
|
||||
end
|
||||
|
||||
def can_send_activation_email
|
||||
scope.can_send_activation_email?(object)
|
||||
end
|
||||
|
||||
def can_activate
|
||||
scope.can_activate?(object)
|
||||
end
|
||||
|
||||
def can_deactivate
|
||||
scope.can_deactivate?(object)
|
||||
end
|
||||
|
||||
end
|
||||
|
Reference in New Issue
Block a user