File tree Expand file tree Collapse file tree 3 files changed +7
-3
lines changed
install/deb/filemanager/filegator
backend/Services/Auth/Adapters Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ public function init(array $config = [])
3232 if (isset ($ _SESSION ['user ' ])) {
3333 $ v_user = $ _SESSION ['user ' ];
3434 }
35- if (isset ($ _SESSION ['look ' ]) && $ _SESSION ['look ' ] != 'admin ' && $ _SESSION ['userContext ' ] === 'admin ' ) {
35+ if (isset ($ _SESSION ['look ' ]) && ( $ _SESSION ['userContext ' ] === 'admin ' ) && ( $ _SESSION ['RESTRICTED_ADMIN ' ] === 'no ' ) ) {
3636 $ v_user = $ _SESSION ['look ' ];
3737 }
3838 $ this ->hestia_user = $ v_user ;
Original file line number Diff line number Diff line change 1515 if (isset ($ _SESSION ['user ' ])) {
1616 $ v_user = $ _SESSION ['user ' ];
1717 }
18- if (isset ($ _SESSION ['look ' ]) && $ _SESSION ['look ' ] != 'admin ' && $ _SESSION ['userContext ' ] === 'admin ' ) {
18+ if (isset ($ _SESSION ['look ' ]) && ( $ _SESSION ['userContext ' ] === 'admin ' ) && ( $ _SESSION ['RESTRICTED_ADMIN ' ] === 'no ' ) ) {
1919 $ v_user = $ _SESSION ['look ' ];
2020 }
2121 # Create filemanager sftp key if missing and trash it after 30 min
Original file line number Diff line number Diff line change 1212 < div class ="l-menu clearfix noselect ">
1313 < div class ="l-menu__item <?php if($TAB == 'WEB' ) echo 'l-menu__item--active' ?> <?php if($TAB == 'DNS' ) echo 'l-menu__item--active' ?> <?php if($TAB == 'MAIL' ) echo 'l-menu__item--active' ?> <?php if($TAB == 'DB' ) echo 'l-menu__item--active' ?> <?php if($TAB == 'BACKUP' ) echo 'l-menu__item--active' ?> <?php if($TAB == 'CRON' ) echo 'l-menu__item--active' ?><?php if($TAB == 'PACKAGE' ) echo 'l-menu__item--active' ?> <?php if($TAB == 'USER' ) echo 'l-menu__item--active' ?> "> < a href ="<?=htmlspecialchars($home_url)?> "> < i class ="fas fa-tasks panel-icon "> </ i > < ?=_('Records')?> </ a > </ div >
1414 < ?php if ((isset($_SESSION['FILE_MANAGER'])) && (!empty($_SESSION['FILE_MANAGER'])) && ($_SESSION['FILE_MANAGER'] == "true")) {?>
15- < div class ="l-menu__item <?php if($TAB == 'FM' ) echo 'l-menu__item--active' ?> "> < a href ="/fm/ "> < i class ="fas fa-folder-open panel-icon "> </ i > < ?=_('Files')?> </ a > </ div >
15+ < ? if (($_SESSION['userContext'] === 'admin') && (isset($_SESSION['look']) && ($_SESSION['look'] === 'admin') && ($_SESSION['RESTRICTED_ADMIN'] == 'yes'))) {?>
16+ <!-- Hide file manager when impersonating admin-->
17+ < ? } else { ?>
18+ < div class ="l-menu__item <?php if($TAB == 'FM' ) echo 'l-menu__item--active' ?> "> < a href ="/fm/ "> < i class ="fas fa-folder-open panel-icon "> </ i > < ?=_('Files')?> </ a > </ div >
19+ < ? } ?>
1620 < ?php } ?>
1721 < div class ="l-menu__item <?php if($TAB == 'STATS' ) echo 'l-menu__item--active' ?> "> < a href ="/list/stats/ "> < i class ="fas fa-chart-line panel-icon "> </ i > < ?=_('Statistics')?> </ a > </ div >
1822 </ div >
You can’t perform that action at this time.
0 commit comments