mirror of https://github.com/zulip/zulip.git
views/users.py: Change error message to use Realm.string_id instead of domain.
This commit is contained in:
parent
0559afb928
commit
00f49d4121
|
@ -309,7 +309,7 @@ def build_custom_checkers(by_lang):
|
|||
]),
|
||||
'exclude_line': set([
|
||||
('zerver/views/users.py',
|
||||
"return json_error(_(\"Email '%(email)s' does not belong to domain '%(domain)s'\") %"),
|
||||
"return json_error(_(\"Email '%(email)s' not allowed for realm '%(realm)s'\") %"),
|
||||
('zproject/settings.py',
|
||||
"'format': '%(asctime)s %(levelname)-8s %(message)s'"),
|
||||
]),
|
||||
|
|
|
@ -211,7 +211,7 @@ class AdminCreateUserTest(ZulipTestCase):
|
|||
short_name='Romeo',
|
||||
))
|
||||
self.assert_json_error(result,
|
||||
"Email 'romeo@not-zulip.com' does not belong to domain 'zulip.com'")
|
||||
"Email 'romeo@not-zulip.com' not allowed for realm 'zulip'")
|
||||
|
||||
RealmAlias.objects.create(realm=get_realm('zulip'), domain='zulip.net')
|
||||
|
||||
|
|
|
@ -345,8 +345,8 @@ def create_user_backend(request, user_profile, email=REQ(), password=REQ(),
|
|||
# invited first.)
|
||||
realm = user_profile.realm
|
||||
if not email_allowed_for_realm(email, user_profile.realm):
|
||||
return json_error(_("Email '%(email)s' does not belong to domain '%(domain)s'") %
|
||||
{'email': email, 'domain': realm.domain})
|
||||
return json_error(_("Email '%(email)s' not allowed for realm '%(realm)s'") %
|
||||
{'email': email, 'realm': realm.string_id})
|
||||
|
||||
try:
|
||||
get_user_profile_by_email(email)
|
||||
|
|
Loading…
Reference in New Issue