mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +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
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue