File tree Expand file tree Collapse file tree 5 files changed +8
-8
lines changed
install/deb/filemanager/filegator/backend/Services/Auth/Adapters Expand file tree Collapse file tree 5 files changed +8
-8
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 ['look ' ] != 'admin ' && $ _SESSION ['userContext ' ] === 'admin ' ) {
3636 $ v_user = $ _SESSION ['look ' ];
3737 }
3838 $ this ->hestia_user = $ v_user ;
Original file line number Diff line number Diff line change 1818 header ("Location: /list/web/ " );
1919 exit ;
2020 }
21- if ($ _SESSION ['userContext ' ] == 'admin ' && !empty ($ _GET ['loginas ' ])) {
21+ if ($ _SESSION ['userContext ' ] === 'admin ' && !empty ($ _GET ['loginas ' ])) {
2222 exec (HESTIA_CMD . "v-list-user " .escapeshellarg ($ _GET ['loginas ' ])." json " , $ output , $ return_var );
2323 if ( $ return_var == 0 ) {
2424 $ data = json_decode (implode ('' , $ output ), true );
3030 unset($ _SESSION ['_sf2_meta ' ]);
3131 }
3232 }
33- if ($ _SESSION ['userContext ' ] == 'admin ' && empty ($ _GET ['loginas ' ])) {
33+ if ($ _SESSION ['userContext ' ] === 'admin ' && empty ($ _GET ['loginas ' ])) {
3434 header ("Location: /list/user/ " );
3535 } else {
3636 header ("Location: /list/web/ " );
Original file line number Diff line number Diff line change @@ -104,7 +104,7 @@ public function realuser() : string
104104 public function user () : string
105105 {
106106 $ user = $ this ->realuser ();
107- if ($ _SESSION ['userContext ' ] == 'admin ' && !empty ($ _SESSION ['look ' ])) {
107+ if ($ _SESSION ['userContext ' ] === 'admin ' && !empty ($ _SESSION ['look ' ])) {
108108 $ user = $ _SESSION ['look ' ];
109109 }
110110
Original file line number Diff line number Diff line change 3434 < i class ="fas fa-bell <?if($panel[$user]['NOTIFICATIONS'] == 'yes') echo " animated extended swing status-icon orange "; ?> "> </ i >
3535 </ a >
3636 </ div >
37- < ?php if ((isset($panel[$user]['ROLE'])) && (!empty($panel[$user]['ROLE'])) && ($panel[$user]['ROLE'] == "admin")) {?>
37+ < ?php if ((isset($panel[$user]['ROLE'])) && (!empty($panel[$user]['ROLE'])) && ($panel[$user]['ROLE'] === "admin")) {?>
3838 < div class ="l-menu__item <?php if($TAB == 'SERVER' ) echo 'l-menu__item--active' ?> <?php if($TAB == 'UPDATES' ) echo 'l-menu__item--active' ?> <?php if($TAB == 'IP' ) echo 'l-menu__item--active' ?> <?php if($TAB == 'RRD' ) echo 'l-menu__item--active' ?> <?php if($TAB == 'FIREWALL' ) echo 'l-menu__item--active' ?> "> < a href ="/list/server/ " class ="l-profile__serversettings " title ="<?=_('Server')?> "> < i class ="fas fa-cog "> </ i > </ a > </ div >
3939 < ?php } ?>
4040
4343 < ? } else { ?>
4444 < div class ="l-menu__item "> < a href ="/edit/user/?user=<?php echo $user; ?>&token=<?=$_SESSION['token']?> " title ="<?=htmlspecialchars($user)?> (<?=htmlspecialchars($panel[$user]['NAME'])?>) " class ="l-profile__username "> < i class ="fas fa-user-edit "> </ i > </ a > </ div >
4545 < ? } ?>
46- < ?php if ((isset($panel[$user]['ROLE'])) && (!empty($panel[$user]['ROLE'])) && ($panel[$user]['ROLE'] == "admin")) {?>
46+ < ?php if ((isset($panel[$user]['ROLE'])) && (!empty($panel[$user]['ROLE'])) && ($panel[$user]['ROLE'] === "admin")) {?>
4747 < div class ="l-menu__item "> < a href ="https://github.com/hestiacp/hestiacp/issues/ " target ="_new " title ="Submit a bug report " class ="l-profile__help "> < i class ="fas fa-exclamation-triangle "> </ i > </ a > </ div >
4848 < ?php } ?>
4949 < div class ="l-menu__item "> < a href ="https://docs.hestiacp.com/ " title ="<?=_('Help')?> " class ="l-profile__help " target ="_blank "> < i class ="fas fa-question-circle "> </ i > </ a > </ div >
Original file line number Diff line number Diff line change 2525 </ span >
2626 </ div >
2727 < div class ="l-menu__item "> < a title ="<?=_('Notifications')?> " class ="l-profile__notifications <? if($panel[$user]['NOTIFICATIONS'] == 'yes') echo " updates "; ?> "> < i class ="fas fa-bell <?if($panel[$user]['NOTIFICATIONS'] == 'yes') echo " status-icon orange "; ?> "> </ i > </ a > </ div >
28- < ?php if ((isset($panel[$user]['ROLE'])) && (!empty($panel[$user]['ROLE'])) && ($panel[$user]['ROLE'] == "admin")) {?>
28+ < ?php if ((isset($panel[$user]['ROLE'])) && (!empty($panel[$user]['ROLE'])) && ($panel[$user]['ROLE'] === "admin")) {?>
2929 < div class ="l-menu__item <?php if($TAB == 'SERVER' ) echo 'l-menu__item--active' ?> <?php if($TAB == 'UPDATES' ) echo 'l-menu__item--active' ?> <?php if($TAB == 'IP' ) echo 'l-menu__item--active' ?> <?php if($TAB == 'RRD' ) echo 'l-menu__item--active' ?> <?php if($TAB == 'FIREWALL' ) echo 'l-menu__item--active' ?> "> < a href ="/list/server/ " class ="l-profile__serversettings " title ="<?=_('Server')?> "> < i class ="fas fa-cog "> </ i > </ a > </ div >
3030 < ?php } ?>
3131 < div class ="l-menu__item "> < a href ="/edit/user/?user=<?php echo $user; ?>&token=<?=$_SESSION['token']?> " title ="<?=htmlspecialchars($user)?> (<?=htmlspecialchars($panel[$user]['NAME'])?>) " class ="l-profile__username "> < i class ="fas fa-user-edit "> </ i > </ a > </ div >
32- < ?php if ((isset($panel[$user]['ROLE'])) && (!empty($panel[$user]['ROLE'])) && ($panel[$user]['ROLE'] == "admin")) {?>
32+ < ?php if ((isset($panel[$user]['ROLE'])) && (!empty($panel[$user]['ROLE'])) && ($panel[$user]['ROLE'] === "admin")) {?>
3333 < div class ="l-menu__item "> < a href ="https://github.com/hestiacp/hestiacp/issues/ " target ="_new " title ="Submit a bug report " class ="l-profile__help "> < i class ="fas fa-exclamation-triangle "> </ i > </ a > </ div >
3434 < ?php } ?>
3535 < div class ="l-menu__item "> < a href ="https://docs.hestiacp.com/ " title ="<?=_('Help')?> " class ="l-profile__help " target ="_blank "> < i class ="fas fa-question-circle "> </ i > </ a > </ div >
You can’t perform that action at this time.
0 commit comments