diff --git a/access.lua b/access.lua index 1ec8672..9f410e2 100644 --- a/access.lua +++ b/access.lua @@ -361,18 +361,13 @@ if auth_header then user = hlp.authenticate(user, password) if user then logger.debug("User got authenticated through basic auth") + -- 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 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() end end