Check if the user has access was done right before, no need to redo it

This commit is contained in:
Alexandre Aubin 2020-03-24 19:52:33 +01:00
parent 4f692c99d8
commit 77afe5cf09

View file

@ -361,18 +361,13 @@ if auth_header then
user = hlp.authenticate(user, password) user = hlp.authenticate(user, password)
if user then if user then
logger.debug("User got authenticated through basic auth") logger.debug("User got authenticated through basic auth")
-- If user has no access to this URL, redirect him to the portal -- If user has no access to this URL, redirect him to the portal
if not hlp.has_access(user) then if not hlp.has_access(user) then
return hlp.redirect(conf.portal_url) return hlp.redirect(conf.portal_url)
end end
hlp.set_headers(user) hlp.set_headers(user)
-- If user has no access to this URL, redirect him to the portal
if not hlp.has_access(user) then
return hlp.redirect(conf.portal_url)
end
return hlp.pass() return hlp.pass()
end end
end end