File tree Expand file tree Collapse file tree 8 files changed +56
-15
lines changed
Expand file tree Collapse file tree 8 files changed +56
-15
lines changed Original file line number Diff line number Diff line change 695695 }
696696 }
697697
698+ // Change RESTRICTED_ADMIN
699+ if (empty ($ _SESSION ['error_msg ' ])) {
700+ if ($ _POST ['v_restrict_admin ' ] != $ _SESSION ['RESTRICTED_ADMIN ' ]) {
701+ exec (HESTIA_CMD ."v-change-sys-config-value RESTRICTED_ADMIN " .escapeshellarg ($ _POST ['v_restrict_admin ' ]), $ output , $ return_var );
702+ check_return_code ($ return_var ,$ output );
703+ unset($ output );
704+ if (empty ($ _SESSION ['error_msg ' ])) $ v_enforce_subdomain_ownership = $ _POST ['v_restrict_admin ' ];
705+ $ v_security_adv = 'yes ' ;
706+ }
707+ }
698708 // Change login style
699709 if (empty ($ _SESSION ['error_msg ' ])) {
700710 if ($ _POST ['v_login_style ' ] != $ _SESSION ['LOGIN_STYLE ' ]) {
Original file line number Diff line number Diff line change 10241024 < br > < br >
10251025 </ td >
10261026 </ tr >
1027+ < ? if (($_SESSION['userContext'] === "admin") && ($_SESSION['user'] === 'admin')) {?>
1028+ < tr >
1029+ < td class ="vst-text input-label ">
1030+ < ?php print _('Restrict access to System Administrator account');?>
1031+ </ td >
1032+ </ tr >
1033+ < tr >
1034+ < td >
1035+ < select class ="vst-list " name ="v_restrict_admin ">
1036+ < option value ='yes '> < ?php print _('yes'); ?> </ option >
1037+ < option value ='no ' < ?php if($_SESSION['RESTRICTED_ADMIN'] == 'no') echo 'selected' ?> > < ?php print _('no'); ?> </ option >
1038+ </ select >
1039+ < br > < br >
1040+ </ td >
1041+ </ tr >
1042+ < ?}?>
10271043 < tr >
10281044 < td class ="vst-text input-label ">
10291045 < ?php print _('Inactive session timeout');?> (< ?php print _('Minutes');?> )
Original file line number Diff line number Diff line change 4646 < button type ="submit " class ="l-sort-toolbar__filter-apply " onclick ="return doSearch('/search/') " value ="" title ="<?=_('Search')?> "> < i class ="fas fa-search "> </ i > </ button >
4747 </ form >
4848 </ td >
49- < ? if (($_SESSION['userContext'] === 'admin') && ($_SESSION['look'] === 'admin')) {?>
49+ < ? if (($_SESSION['userContext'] === 'admin') && ($_SESSION['look'] === 'admin') && ($_SESSION['RESTRICTED_ADMIN'] === 'yes') ) {?>
5050 <!-- Hide bulk actions for domain items when impersonating 'admin' account-->
5151 < ? } else { ?>
5252 < td >
Original file line number Diff line number Diff line change 2727 < button type ="submit " class ="l-sort-toolbar__filter-apply " onclick ="return doSearch('/search/') " value ="" title ="<?=_('Search')?> "> < i class ="fas fa-search "> </ i > </ button >
2828 </ form >
2929 </ td >
30- < ? if (($_SESSION['userContext'] === 'admin') && ($_SESSION['look'] === 'admin')) {?>
30+ < ? if (($_SESSION['userContext'] === 'admin') && ($_SESSION['look'] === 'admin') && ($_SESSION['RESTRICTED_ADMIN'] === 'yes') ) {?>
3131 <!-- Hide bulk actions for domain items when impersonating 'admin' account-->
3232 < ? } else { ?>
3333 < td >
Original file line number Diff line number Diff line change 11< div class ="l-center ">
22 < div class ="l-sort clearfix noselect ">
33 < div class ="l-unit-toolbar__buttonstrip ">
4- < a href ="/edit/user/?user=<?php echo $user; ?>&token=<?=$_SESSION['token']?> " id ="btn-back " class ="ui-button cancel " dir ="ltr "> < i class ="fas fa-arrow-left status-icon blue "> </ i > < ?=_('Back')?> </ a >
4+ < ? if (($_SESSION['userContext'] === 'admin') && ($_SESSION['look'] === 'admin')) {?>
5+ < a href ="/list/user/ " id ="btn-back " class ="ui-button cancel " dir ="ltr "> < i class ="fas fa-arrow-left status-icon blue "> </ i > < ?=_('Back')?> </ a >
6+ < ? } else { ?>
7+ < a href ="/edit/user/?user=<?php echo $user; ?>&token=<?=$_SESSION['token']?> " id ="btn-back " class ="ui-button cancel " dir ="ltr "> < i class ="fas fa-arrow-left status-icon blue "> </ i > < ?=_('Back')?> </ a >
8+ < ? } ?>
9+
510 < a href ="/list/log/auth/ " id ="btn-list " class ="ui-button cancel " dir ="ltr " title ="<?=_('Login history');?> "> < i class ="fas fa-binoculars status-icon green "> </ i > < ?=_('Login history')?> </ a >
611 </ div >
712 < div class ="l-unit-toolbar__buttonstrip float-right ">
813 < a href ="javascript:location.reload(); " class ="ui-button cancel " dir ="ltr "> < i class ="fas fa-redo status-icon green "> </ i > < ?=_('Refresh')?> </ a >
14+ < ? if (($_SESSION['userContext'] === 'admin') && ($_SESSION['look'] === 'admin') && ($_SESSION['RESTRICTED_ADMIN'] === 'yes')) {?>
15+ <!-- Hide delete buttons-->
16+ < ? } else { ?>
917 < div class ="actions-panel display-inline-block " key-action ="js ">
1018 < a class ="data-controls do_delete ui-button danger cancel ">
1119 < i class ="do_delete fas fa-times-circle status-icon red "> </ i > < ?=_('Delete')?>
1220 < input type ="hidden " name ="delete_url " value ="/delete/log/?token=<?=$_SESSION['token']?> " />
1321 < div class ="confirmation-text-delete hidden " title ="<?=_('Confirmation')?> ">
1422 < p class ="confirmation "> < ?=_('DELETE_LOGS_CONFIRMATION')?> </ p >
1523 </ div >
16- </ a >
17- </ div >
24+ </ a >
25+ </ div >
26+ < ? } ?>
1827 </ div >
1928 </ div >
2029</ div >
Original file line number Diff line number Diff line change 55 </ div >
66 < div class ="l-unit-toolbar__buttonstrip float-right ">
77 < a href ="javascript:location.reload(); " class ="ui-button cancel " dir ="ltr "> < i class ="fas fa-redo status-icon green "> </ i > < ?=_('Refresh')?> </ a >
8- < div class ="actions-panel display-inline-block " key-action ="js ">
9- < a class ="data-controls do_delete ui-button danger cancel ">
10- < i class ="do_delete fas fa-times-circle status-icon red "> </ i > < ?=_('Delete')?>
11- < input type ="hidden " name ="delete_url " value ="/delete/log/auth/?token=<?=$_SESSION['token']?> " />
12- < div class ="confirmation-text-delete hidden " title ="<?=_('Confirmation')?> ">
13- < p class ="confirmation "> < ?=_('DELETE_LOGS_CONFIRMATION')?> </ p >
14- </ div >
15- </ a >
16- </ div >
8+ < ? if (($_SESSION['userContext'] === 'admin') && ($_SESSION['look'] === 'admin') && ($_SESSION['RESTRICTED_ADMIN'] === 'yes')) {?>
9+ <!-- Hide delete buttons-->
10+ < ? } else { ?>
11+ < div class ="actions-panel display-inline-block " key-action ="js ">
12+ < a class ="data-controls do_delete ui-button danger cancel ">
13+ < i class ="do_delete fas fa-times-circle status-icon red "> </ i > < ?=_('Delete')?>
14+ < input type ="hidden " name ="delete_url " value ="/delete/log/auth/?token=<?=$_SESSION['token']?> " />
15+ < div class ="confirmation-text-delete hidden " title ="<?=_('Confirmation')?> ">
16+ < p class ="confirmation "> < ?=_('DELETE_LOGS_CONFIRMATION')?> </ p >
17+ </ div >
18+ </ a >
19+ </ div >
20+ < ? } ?>
1721 </ div >
1822 </ div >
1923</ div >
Original file line number Diff line number Diff line change 11 < div class ="l-center ">
22 < div class ="l-sort clearfix noselect ">
33 < div class ="l-unit-toolbar__buttonstrip ">
4- < ? if (($_SESSION['userContext'] === 'admin') && ($_SESSION['RESTRICTED_ADMIN'] === 'yes')) {?>
4+ < ? if (($_SESSION['userContext'] === 'admin') && ($_SESSION['look'] === 'admin') && ($_SESSION[' RESTRICTED_ADMIN'] === 'yes')) {?>
55 <!-- Hide item creation button when impersonating 'admin' account -->
66 < ? } else {?>
77 < a href ="/add/web/ " id ="btn-create " class ="ui-button cancel " dir ="ltr "> < i class ="fas fa-plus-circle status-icon green "> </ i > < ?=_('Add Web Domain')?> </ a >
Original file line number Diff line number Diff line change 4545 < ? } ?>
4646 < ? if (($_SESSION['userContext'] === 'admin') && (isset($_SESSION['look']) && ($user == 'admin'))) {?>
4747 <!-- Hide 'edit user' entry point from other administrators for default 'admin' account-->
48+ < div class ="l-menu__item "> < a href ="/list/log/ " title ="<?_('Logs')?> " class ="l-profile__username "> < i class ="fas fa-history "> </ i > </ a > </ div >
4849 < ? } else { ?>
4950 < 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 >
5051 < ? } ?>
52+
5153 < ?php if ((isset($panel[$user]['ROLE'])) && (!empty($panel[$user]['ROLE'])) && ($panel[$user]['ROLE'] === "admin")) {?>
5254 < div class ="l-menu__item "> < a href ="https://github.com/hestiacp/hestiacp/issues/ " rel ="noopener " target ="_new " title ="Submit a bug report " class ="l-profile__help "> < i class ="fas fa-exclamation-triangle "> </ i > </ a > </ div >
5355 < ?php } ?>
You can’t perform that action at this time.
0 commit comments