From 3ca4cb26bc54fb798586c3b2c6f527d7faeec6ca Mon Sep 17 00:00:00 2001 From: Marcin Haba Date: Mon, 25 May 2020 19:47:12 +0200 Subject: [PATCH] baculum: Fix problem with authorization error after upgrade --- gui/baculum/protected/Web/Class/BaculumWebPage.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gui/baculum/protected/Web/Class/BaculumWebPage.php b/gui/baculum/protected/Web/Class/BaculumWebPage.php index 29121095f..703d77625 100644 --- a/gui/baculum/protected/Web/Class/BaculumWebPage.php +++ b/gui/baculum/protected/Web/Class/BaculumWebPage.php @@ -151,6 +151,12 @@ class BaculumWebPage extends BaculumPage { */ $result = $this->getModule('user_config')->importUsers(); if ($result) { + /** + * User must be logged out because after upgrade to first version + * which supports new users management and first page load + * roles are not saved in config yet. Hence they are not set for the user. + */ + $this->getModule('auth')->logout(); $this->goToDefaultPage(); } } -- 2.47.3