BUG: staff should not be allowed to edit emails when email_editable is false

This commit is contained in:
Sam 2014-08-15 12:41:01 +10:00
parent e16dd96b6d
commit 0e5ab97a87

View File

@ -14,8 +14,8 @@ module UserGuardian
def can_edit_email?(user)
return false if (SiteSetting.sso_overrides_email? && SiteSetting.enable_sso?)
return true if is_staff?
return false unless SiteSetting.email_editable?
return true if is_staff?
can_edit?(user)
end