From 9ed707c34b7f0ade959ef553ccc07933d9c20c60 Mon Sep 17 00:00:00 2001 From: Parth Date: Wed, 8 Sep 2021 12:30:36 +0530 Subject: [PATCH] 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 --- zerver/lib/actions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zerver/lib/actions.py b/zerver/lib/actions.py index cc8b19d189..ce42259d61 100644 --- a/zerver/lib/actions.py +++ b/zerver/lib/actions.py @@ -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)