mirror of
https://github.com/zulip/zulip.git
synced 2026-07-15 21:03:26 +08:00
management commands: Use Realm.string_id instead of domain in print statements.
This commit is contained in:
parent
5dc683ba8d
commit
11346e50bb
@ -31,7 +31,7 @@ class Command(BaseCommand):
|
||||
|
||||
print("Deactivating %s (%s) - %s" % (user_profile.full_name,
|
||||
user_profile.email,
|
||||
user_profile.realm.domain))
|
||||
user_profile.realm.string_id))
|
||||
print("%s has the following active sessions:" % (user_profile.email,))
|
||||
for session in user_sessions(user_profile):
|
||||
print(session.expire_date, session.get_decoded())
|
||||
|
||||
@ -122,7 +122,7 @@ class Command(BaseCommand):
|
||||
if os.path.exists(output_dir):
|
||||
shutil.rmtree(output_dir)
|
||||
os.makedirs(output_dir)
|
||||
print("Exporting realm %s" % (realm.domain,))
|
||||
print("Exporting realm %s" % (realm.string_id,))
|
||||
num_threads = int(options['threads'])
|
||||
if num_threads < 1:
|
||||
raise CommandError('You must have at least one thread.')
|
||||
|
||||
@ -54,7 +54,7 @@ ONLY perform this on customer request from an authorized person.
|
||||
print("Done!")
|
||||
else:
|
||||
print("Would have granted %s %s rights for %s" % (
|
||||
email, options['permission'], profile.realm.domain))
|
||||
email, options['permission'], profile.realm.string_id))
|
||||
else:
|
||||
if profile.has_perm(options['permission'], profile.realm):
|
||||
if options['ack']:
|
||||
@ -62,6 +62,6 @@ ONLY perform this on customer request from an authorized person.
|
||||
print("Done!")
|
||||
else:
|
||||
print("Would have removed %s's %s rights on %s" % (email, options['permission'],
|
||||
profile.realm.domain))
|
||||
profile.realm.string_id))
|
||||
else:
|
||||
raise CommandError("User did not have permission for this realm!")
|
||||
|
||||
@ -41,7 +41,7 @@ class Command(BaseCommand):
|
||||
# type: (*Any, **str) -> None
|
||||
realm = get_realm(options["string_id"])
|
||||
if options["op"] == "show":
|
||||
print("Aliases for %s:" % (realm.domain,))
|
||||
print("Aliases for %s:" % (realm.string_id,))
|
||||
for alias in get_realm_aliases(realm):
|
||||
if alias["allow_subdomains"]:
|
||||
print(alias["domain"] + " (subdomains allowed)")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user