# HG changeset patch
# User bsw
# Date 1613306116 -3600
# Node ID cbce4491c93ea4197e687cb7efc74a8c4ac536a6
# Parent 4b74a177884bfbd36fe7b0ba756fe3c9992d49cc
Redirect to login from index page when no access rights
diff -r 4b74a177884b -r cbce4491c93e app/main/_filter/21_auth.lua
--- a/app/main/_filter/21_auth.lua Sun Feb 14 13:29:56 2021 +0100
+++ b/app/main/_filter/21_auth.lua Sun Feb 14 13:35:16 2021 +0100
@@ -5,8 +5,7 @@
local auth_needed = true
if module == 'index' and (
- view == 'index'
- or view == "login"
+ view == "login"
or action == "login"
or view == "register"
or action == "register"
diff -r 4b74a177884b -r cbce4491c93e app/main/index/index.lua
--- a/app/main/index/index.lua Sun Feb 14 13:29:56 2021 +0100
+++ b/app/main/index/index.lua Sun Feb 14 13:35:16 2021 +0100
@@ -1,8 +1,3 @@
-if not app.session:has_access("anonymous") then
- slot.put("
Closed user group, please login.
")
- return
-end
-
local unit_id = request.get_param{ name = "unit" }
local area_id = request.get_param{ name = "area" }