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:
Neil Lalonde
2013-05-07 21:58:34 -04:00
parent 6b536dcde5
commit f35a44aeae
8 changed files with 121 additions and 1 deletions

View File

@ -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?