mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-12-10 13:20:09 -05:00
Make DomainSpecificString an attrs class (#9875)
This commit is contained in:
parent
ceaa76970f
commit
a15c003e5b
4 changed files with 24 additions and 8 deletions
|
|
@ -61,6 +61,15 @@ class NewUserConsentResource(DirectServeHtmlResource):
|
|||
self._sso_handler.render_error(request, "bad_session", e.msg, code=e.code)
|
||||
return
|
||||
|
||||
# It should be impossible to get here without having first been through
|
||||
# the pick-a-username step, which ensures chosen_localpart gets set.
|
||||
if not session.chosen_localpart:
|
||||
logger.warning("Session has no user name selected")
|
||||
self._sso_handler.render_error(
|
||||
request, "no_user", "No user name has been selected.", code=400
|
||||
)
|
||||
return
|
||||
|
||||
user_id = UserID(session.chosen_localpart, self._server_name)
|
||||
user_profile = {
|
||||
"display_name": session.display_name,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue