mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 19:13:39 +08:00
BUG: staff should not be allowed to edit emails when email_editable is false
This commit is contained in:
parent
e16dd96b6d
commit
0e5ab97a87
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user