liquid_feedback_frontend

changeset 1541:1eaea27130bc

Fixed logic in auth filter
author bsw
date Tue Oct 20 18:02:38 2020 +0200 (2020-10-20)
parents b0b557858fd8
children 8f354722d754
files app/main/_filter/21_auth.lua
line diff
     1.1 --- a/app/main/_filter/21_auth.lua	Tue Oct 20 17:58:07 2020 +0200
     1.2 +++ b/app/main/_filter/21_auth.lua	Tue Oct 20 18:02:38 2020 +0200
     1.3 @@ -56,7 +56,7 @@
     1.4    auth_needed = false
     1.5  end
     1.6  
     1.7 -if app.session then
     1.8 +if auth_needed then
     1.9  
    1.10    if app.session:has_access("anonymous") then
    1.11  
    1.12 @@ -127,7 +127,7 @@
    1.13  --   app.session.user_id = 1
    1.14  -- end
    1.15  
    1.16 -if auth_needed and not app.session or not app.session.member then
    1.17 +if auth_needed and not app.session.member then
    1.18    trace.debug("Not authenticated yet.")
    1.19    local params = json.object()
    1.20    for key, val in pairs(request.get_param_strings()) do
    1.21 @@ -149,8 +149,8 @@
    1.22  elseif auth_needed and app.session.member.locked then
    1.23    trace.debug("Member locked.")
    1.24    request.redirect{ module = 'index', view = 'login' }
    1.25 -elseif app.session then
    1.26 -  if config.check_delegations_interval_hard and app.session.member_id and app.session.needs_delegation_check 
    1.27 +else
    1.28 +  if app.session and config.check_delegations_interval_hard and app.session.member_id and app.session.needs_delegation_check 
    1.29      and not (module == "admin" or (module == "index" and (
    1.30        view == "check_delegations" 
    1.31        or action == "check_delegations" 

Impressum / About Us