projects
/
mediagoblin.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
log a previously logged in user when switched to no_auth mode
[mediagoblin.git]
/
mediagoblin
/
auth
/
tools.py
diff --git
a/mediagoblin/auth/tools.py
b/mediagoblin/auth/tools.py
index bd171261898e5b8fd5bc9ab497a03922b69d8666..7d051a667d399f1dabc095a219c383c6bdee5880 100644
(file)
--- a/
mediagoblin/auth/tools.py
+++ b/
mediagoblin/auth/tools.py
@@
-76,3
+76,9
@@
def check_auth_enabled():
return False
else:
return True
+
+
+def no_auth_logout(request):
+ """Log out the user if in no_auth mode"""
+ if not mg_globals.app.auth:
+ request.session.delete()