diff options
author | 2018-05-20 23:29:17 +0100 | |
---|---|---|
committer | 2018-05-20 23:29:17 +0100 | |
commit | 449d52caf4010ed112f1928bf6b5234bcfb9a339 (patch) | |
tree | 3ce59258a68fcb4174610b157f3a3ae9c50be02a /pysite/views/main/auth/done.py | |
parent | Tests directory (#73) (diff) |
Privacy/Usability updates (#75)
* Use less intrusive oauth scopes, add login redirect method
* Remove debugging prints, add missing __init__
* Work towards new privacy policy
* Fix judging state icons on code jam management page
* Jammer profile retraction and punishments based on jam status
* Linting
* [Jams] Deny profile saving for users < 13 years, and finish removal page
* Fix tests
* Clean up and address Volcyy's review
* Add proper login redirection to require_roles decorator
* Fix template is_staff() and add staff link to navigation
* Address lemon's review
* Linting
* Privacy page formatting
* Privacy page formatting
Diffstat (limited to 'pysite/views/main/auth/done.py')
-rw-r--r-- | pysite/views/main/auth/done.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/pysite/views/main/auth/done.py b/pysite/views/main/auth/done.py new file mode 100644 index 00000000..6e892906 --- /dev/null +++ b/pysite/views/main/auth/done.py @@ -0,0 +1,18 @@ +from flask import redirect, session, url_for + +from pysite.base_route import RouteView + + +class AuthDoneView(RouteView): + path = "/auth/done" + name = "auth.done" + + def get(self): + if self.logged_in: + target = session.get("redirect_target") + + if target: + del session["redirect_target"] + return redirect(url_for(target["url"], **target.get("kwargs", {}))) + + return redirect(url_for("main.index")) |