From 4e684424b3d209b8c1380e2a9e148ae2a8ad7611 Mon Sep 17 00:00:00 2001 From: Daniel Krupp Date: Fri, 18 Oct 2024 15:05:39 +0200 Subject: [PATCH] CodeChecker authentication fixed If the super_user field was missing from the config file, CodeChecker authentication failed for all users. --- web/server/codechecker_server/session_manager.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/web/server/codechecker_server/session_manager.py b/web/server/codechecker_server/session_manager.py index 2bcae3cbc9..282aad627b 100644 --- a/web/server/codechecker_server/session_manager.py +++ b/web/server/codechecker_server/session_manager.py @@ -539,6 +539,9 @@ def get_db_auth_session_tokens(self, user_name): def __is_root_user(self, user_name): """ Return True if the given user has system permissions. """ + if 'super_user' not in self.__auth_config: + return False + if self.__auth_config['super_user'] == user_name: return True