Skip to content

Commit

Permalink
Merge pull request #47 from ibab/sync-upstream
Browse files Browse the repository at this point in the history
Synchronize user_wait_handler.py with upstream
  • Loading branch information
anaderi committed Mar 5, 2016
2 parents 4c11988 + 5cfb681 commit 086859f
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions everware/user_wait_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
class UserSpawnHandler(BaseHandler):

@gen.coroutine
def get(self, name):
def get(self, name, user_path):
current_user = self.get_current_user()
if current_user and current_user.name == name:
# logged in, work with spawner
Expand Down Expand Up @@ -50,11 +50,8 @@ def get(self, name):
)
self.finish(html)
else:
# not logged in to the right user,
# clear any cookies and reload (will redirect to login)
self.clear_login_cookie()
self.redirect(url_concat(
self.settings['login_url'], {
'next': self.request.uri,
}
))
# logged in as a different user, redirect
target = url_path_join(self.base_url, 'user', current_user.name,
user_path or '')
self.redirect(target)

0 comments on commit 086859f

Please sign in to comment.