mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 21:43:21 +00:00
settings: Allow admin to change email/name even if it is disabled in realm.
Allow realm admin users to change their email or name even, changing name or email is disabled in realm.
This commit is contained in:
@@ -127,6 +127,12 @@ class EmailChangeTestCase(ZulipTestCase):
|
||||
self.assertEqual(result.status_code, 400)
|
||||
self.assert_in_response("Email address changes are disabled in this organization.",
|
||||
result)
|
||||
# Realm admins can change their email address even setting is disabled.
|
||||
data = {'email': 'iago-new@zulip.com'}
|
||||
self.login(self.example_email("iago"))
|
||||
url = '/json/settings'
|
||||
result = self.client_patch(url, data)
|
||||
self.assert_in_success_response(['Check your email for a confirmation link.'], result)
|
||||
|
||||
def test_email_change_already_taken(self) -> None:
|
||||
data = {'email': 'cordelia@zulip.com'}
|
||||
|
||||
Reference in New Issue
Block a user