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
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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:

+5 −0
Original line number Diff line number Diff line
@@ -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':