mirror of
https://github.com/discourse/discourse.git
synced 2025-06-06 13:06:56 +08:00
BUG: staff should not be allowed to edit emails when email_editable is false
This commit is contained in:
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user