mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 04:41:25 +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:
@ -58,6 +58,7 @@ class Guardian
|
||||
end
|
||||
alias :can_move_posts? :can_moderate?
|
||||
alias :can_see_flags? :can_moderate?
|
||||
alias :can_send_activation_email? :can_moderate?
|
||||
|
||||
# Can the user create a topic in the forum
|
||||
def can_create?(klass, parent=nil)
|
||||
@ -105,6 +106,7 @@ class Guardian
|
||||
return false if target.approved?
|
||||
@user.staff?
|
||||
end
|
||||
alias :can_activate? :can_approve?
|
||||
|
||||
def can_ban?(user)
|
||||
return false if user.blank?
|
||||
@ -112,6 +114,7 @@ class Guardian
|
||||
return false if user.admin?
|
||||
true
|
||||
end
|
||||
alias :can_deactivate? :can_ban?
|
||||
|
||||
def can_clear_flags?(post)
|
||||
return false if @user.blank?
|
||||
|
Reference in New Issue
Block a user