]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
baculum: Fix directing to default page after log in for users with non-admin roles
authorMarcin Haba <marcin.haba@bacula.pl>
Thu, 28 Apr 2022 03:05:48 +0000 (05:05 +0200)
committerMarcin Haba <marcin.haba@bacula.pl>
Thu, 28 Apr 2022 03:24:42 +0000 (05:24 +0200)
gui/baculum/protected/Web/Class/BaculumWebPage.php

index baa3aa5b71d080e51fa9de0767f38a30e30a3a97..95d6fdc9d3c7be7fe91be9ee8f65d658014fd3a9 100644 (file)
@@ -157,8 +157,8 @@ class BaculumWebPage extends BaculumPage {
                for ($i = 0; $i < count($roles); $i++) {
                        $rpages = $user_role->getPagesByRole($roles[$i]);
                        for ($j = 0; $j < count($rpages); $j++) {
-                               if (!in_array($rpages[$i], $pages) && $manager->isPageAllowed($this->User, $rpages[$i])) {
-                                       $pages[] = $rpages[$i];
+                               if (!in_array($rpages[$j], $pages) && $manager->isPageAllowed($this->User, $rpages[$j])) {
+                                       $pages[] = $rpages[$j];
                                }
                        }
                }