clears authtoken & add PAT

This commit is contained in:
adamscmRH
2018-01-18 10:57:54 -05:00
parent 88bc4a0a9c
commit 310f37dd37
34 changed files with 558 additions and 628 deletions
+6 -2
View File
@@ -68,8 +68,12 @@ class LoggedLoginView(auth_views.LoginView):
current_user = getattr(request, 'user', None)
if current_user and getattr(current_user, 'pk', None) and current_user != original_user:
logger.info("User {} logged in.".format(current_user.username))
return ret
if request.user.is_authenticated:
return ret
else:
ret.status = 401
return ret
class LoggedLogoutView(auth_views.LogoutView):