]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
baculum: Fix problem with authorization error after upgrade
authorMarcin Haba <marcin.haba@bacula.pl>
Mon, 25 May 2020 17:47:12 +0000 (19:47 +0200)
committerMarcin Haba <marcin.haba@bacula.pl>
Mon, 25 May 2020 17:47:12 +0000 (19:47 +0200)
gui/baculum/protected/Web/Class/BaculumWebPage.php

index 29121095fd5bb2d055782be9d74a531ff7668475..703d7762554d7ccf6f027fc8522e4b6453b9ed3b 100644 (file)
@@ -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();
                }
        }