From: Marcin Haba Date: Thu, 28 Apr 2022 03:05:48 +0000 (+0200) Subject: baculum: Fix directing to default page after log in for users with non-admin roles X-Git-Tag: Release-13.0.0~49 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2cc7f4cb60ea96ba5d0dac5440f676c2bdab1564;p=thirdparty%2Fbacula.git baculum: Fix directing to default page after log in for users with non-admin roles --- diff --git a/gui/baculum/protected/Web/Class/BaculumWebPage.php b/gui/baculum/protected/Web/Class/BaculumWebPage.php index baa3aa5b7..95d6fdc9d 100644 --- a/gui/baculum/protected/Web/Class/BaculumWebPage.php +++ b/gui/baculum/protected/Web/Class/BaculumWebPage.php @@ -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]; } } }