Skip to content

Commit

Permalink
Authenticate, go home from login page
Browse files Browse the repository at this point in the history
  • Loading branch information
kiblik committed Mar 8, 2024
1 parent be59027 commit a6cdaec
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dojo/user/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ def api_v2_key(request):
@dojo_ratelimit(key='post:username')
@dojo_ratelimit(key='post:password')
def login_view(request):
if request.user.is_authenticated:
return HttpResponseRedirect(reverse('home'))
if not settings.SHOW_LOGIN_FORM and settings.SOCIAL_LOGIN_AUTO_REDIRECT and sum([
settings.GOOGLE_OAUTH_ENABLED,
settings.OKTA_OAUTH_ENABLED,
Expand Down

0 comments on commit a6cdaec

Please sign in to comment.