Skip to content
Snippets Groups Projects
Commit 012b338c authored by Stefano Alberto Russo's avatar Stefano Alberto Russo
Browse files

Added the DISABLE_LOCAL_AUTH conf to the README and fixed an inconsistent...

Added the DISABLE_LOCAL_AUTH conf to the README and fixed an inconsistent behaviour in the login page.
parent 0db26b31
No related branches found
No related tags found
No related merge requests found
......@@ -64,6 +64,7 @@ Example Webapp configuraion:
- OIDC_OP_AUTHORIZATION_ENDPOINT=""
- OIDC_OP_TOKEN_ENDPOINT=""
- OIDC_OP_JWKS_ENDPOINT=""
- DISABLE_LOCAL_AUTH=False
In Rosetta, only power users can:
......
......@@ -36,6 +36,11 @@ def login_view(request):
# If authenticated user reloads the main URL
if request.method == 'GET' and request.user.is_authenticated:
return HttpResponseRedirect('/main/')
else:
# If local auth disabled, just render login page
# (will be rendered an open id connect url only)
if settings.DISABLE_LOCAL_AUTH:
return render(request, 'login.html', {'data': data})
# If unauthenticated user tries to log in
if request.method == 'POST':
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment