authentication: Fix placeholder realms for redirects.

The name of the new realm created as a tombstone after renaming
a realm's subdomain is the constant 'placeholder-realm'.
This would confuse the user when shown the deactivation notice
and asking to join the realm at a new subdomain.
This PR replaces it with the original realm name to avoid confusion.
Fixes: #19677
This commit is contained in:
Parth 2021-09-08 12:30:36 +05:30 committed by Tim Abbott
parent 8bab712cb4
commit 9ed707c34b
1 changed files with 1 additions and 1 deletions

View File

@ -1135,7 +1135,7 @@ def do_change_realm_subdomain(
# deactivated. We are creating a deactivated realm using old subdomain and setting
# it's deactivated redirect to new_subdomain so that we can tell the users that
# the realm has been moved to a new subdomain.
placeholder_realm = do_create_realm(old_subdomain, "placeholder-realm")
placeholder_realm = do_create_realm(old_subdomain, realm.name)
do_deactivate_realm(placeholder_realm, acting_user=None)
do_add_deactivated_redirect(placeholder_realm, realm.uri)