Merge pull request #2881 from minrk/auth-state-earlier

trigger auth_state_hook prior to options form, add auth_state to template namespace
This commit is contained in:
Min RK
2020-01-17 12:35:33 +01:00
committed by GitHub
5 changed files with 53 additions and 15 deletions

View File

@@ -1431,8 +1431,13 @@ class UserUrlHandler(BaseHandler):
url_path_join(self.hub.base_url, "spawn", user.escaped_name, server_name),
{"next": self.request.uri},
)
auth_state = await user.get_auth_state()
html = self.render_template(
"not_running.html", user=user, server_name=server_name, spawn_url=spawn_url
"not_running.html",
user=user,
server_name=server_name,
spawn_url=spawn_url,
auth_state=auth_state,
)
self.finish(html)