[checkmk-commits] Check_MK Git: check_mk: FIX: Fixed "access denied" problem with multisite authorization in

git version control git at mathias-kettner.de
Thu Nov 15 10:27:59 CET 2012


Module: check_mk
Branch: master
Commit: 9ea015629e45157769c8bf17c0a83615f2228b6a
URL:    http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=9ea015629e45157769c8bf17c0a83615f2228b6a

Author: Lars Michelsen <lm at mathias-kettner.de>
Date:   Thu Nov 15 10:25:36 2012 +0100

FIX: Fixed "access denied" problem with multisite authorization in
PNP/NagVis in new OMD sites which use the multisite authorization

Conflicts:

	ChangeLog

---

 ChangeLog           |    2 ++
 web/htdocs/index.py |    9 ++++++---
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 416815d..80f308d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -114,6 +114,8 @@
     * FIX: WATO Folder filter not available when WATO disabled
     * FIX: WATO Folder Filter no longer available in single host views
     * FIX: Quicksearch converts search text to regex when accessing livestatus
+    * FIX: Fixed "access denied" problem with multisite authorization in PNP/NagVis
+           in new OMD sites which use the multisite authorization
     * FIX: Localize option for not OMD Environments
 
     WATO:
diff --git a/web/htdocs/index.py b/web/htdocs/index.py
index f7e8ebd..6eab289 100644
--- a/web/htdocs/index.py
+++ b/web/htdocs/index.py
@@ -35,7 +35,7 @@ from mod_python import apache, util, Cookie
 import sys, os, pprint
 from lib import *
 import livestatus
-import defaults, config, htmllib, login
+import defaults, config, htmllib, login, default_permissions
 
 # Load page handlers
 pagehandlers = {}
@@ -261,6 +261,10 @@ def handler(req, profiling = True):
         output_format = html.var("output_format", "html")
         html.set_output_format(output_format)
 
+        # First initialization of the default permissions. Needs to be done before the auth_file
+        # (auth.php) ist written (it's done during showing the login page for the first time).
+        default_permissions.load()
+
         # Is the user set by the webserver? otherwise use the cookie based auth
         if not req.user or type(req.user) != str:
             config.auth_type = 'cookie'
@@ -297,8 +301,7 @@ def handler(req, profiling = True):
         # All plugins might have to be reloaded due to a language change
         load_all_plugins()
 
-        # Initialize default permissions (maybe reload due to language change)
-        import default_permissions
+        # Reload default permissions (maybe reload due to language change)
         default_permissions.load()
 
         # User allowed to login at all?



More information about the checkmk-commits mailing list