Skip to content

Commit 3ded651

Browse files
author
Kristan Kenney
committed
Update logic for security options
1 parent 834c6fa commit 3ded651

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

web/edit/server/index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -739,7 +739,7 @@
739739
}
740740
}
741741

742-
// Change POLICY_SYSTEM_PROTECTED_ADMIN
742+
// Change POLICY_SYSTEM_HIDE_ADMIN
743743
if (empty($_SESSION['error_msg'])) {
744744
if ($_POST['v_policy_system_hide_admin'] != $_SESSION['POLICY_SYSTEM_HIDE_ADMIN']) {
745745
exec (HESTIA_CMD."v-change-sys-config-value POLICY_SYSTEM_HIDE_ADMIN ".escapeshellarg($_POST['v_policy_system_hide_admin']), $output, $return_var);

web/templates/admin/edit_server.html

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1036,7 +1036,7 @@
10361036
<td>
10371037
<select class="vst-list" name="v_policy_system_protected_admin">
10381038
<option value='yes'><?php print _('yes'); ?></option>
1039-
<option value='no' <?php if($_SESSION['POLICY_SYSTEM_PROTECTED_ADMIN'] == 'no') echo 'selected' ?> ><?php print _('no'); ?></option>
1039+
<option value='no' <?php if($_SESSION['POLICY_SYSTEM_PROTECTED_ADMIN'] !== 'yes') echo 'selected' ?>><?php print _('no'); ?></option>
10401040
</select>
10411041
<br><br>
10421042
</td>
@@ -1050,7 +1050,7 @@
10501050
<td>
10511051
<select class="vst-list" name="v_policy_system_hide_admin">
10521052
<option value='yes'><?php print _('yes'); ?></option>
1053-
<option value='no' <?php if($_SESSION['POLICY_SYSTEM_HIDE_ADMIN'] == 'no') echo 'selected' ?> ><?php print _('no'); ?></option>
1053+
<option value='no' <?php if($_SESSION['POLICY_SYSTEM_HIDE_ADMIN'] !== 'yes') echo 'selected' ?>><?php print _('no'); ?></option>
10541054
</select>
10551055
<br><br>
10561056
</td>
@@ -1064,8 +1064,8 @@
10641064
<tr>
10651065
<td>
10661066
<select class="vst-list" name="v_policy_user_edit_details">
1067-
<option value='yes'><?php print _('yes'); ?></option>
1068-
<option value='no' <?php if($_SESSION['POLICY_USER_EDIT_DETAILS'] == 'no') echo 'selected' ?> ><?php print _('no'); ?></option>
1067+
<option value='yes' <?php if($_SESSION['POLICY_USER_EDIT_DETAILS'] !== 'no') echo 'selected' ?>><?php print _('yes'); ?></option>
1068+
<option value='no' <?php if($_SESSION['POLICY_USER_EDIT_DETAILS'] == 'no') echo 'selected' ?>><?php print _('no'); ?></option>
10691069
</select>
10701070
<br><br>
10711071
</td>
@@ -1078,8 +1078,8 @@
10781078
<tr>
10791079
<td>
10801080
<select class="vst-list" name="v_policy_user_view_logs">
1081-
<option value='yes'><?php print _('yes'); ?></option>
1082-
<option value='no' <?php if($_SESSION['POLICY_USER_VIEW_LOGS'] == 'no') echo 'selected' ?> ><?php print _('no'); ?></option>
1081+
<option value='yes' <?php if($_SESSION['POLICY_USER_VIEW_LOGS'] !== 'no') echo 'selected' ?>><?php print _('yes'); ?></option>
1082+
<option value='no' <?php if($_SESSION['POLICY_USER_VIEW_LOGS'] == 'no') echo 'selected' ?>><?php print _('no'); ?></option>
10831083
</select>
10841084
<br><br>
10851085
</td>
@@ -1092,8 +1092,8 @@
10921092
<tr>
10931093
<td>
10941094
<select class="vst-list" name="v_policy_user_delete_logs">
1095-
<option value='yes'><?php print _('yes'); ?></option>
1096-
<option value='no' <?php if($_SESSION['POLICY_USER_DELETE_LOGS'] == 'no') echo 'selected' ?> ><?php print _('no'); ?></option>
1095+
<option value='yes' <?php if($_SESSION['POLICY_USER_DELETE_LOGS'] !== 'no') echo 'selected' ?>><?php print _('yes'); ?></option>
1096+
<option value='no' <?php if($_SESSION['POLICY_USER_DELETE_LOGS'] == 'no') echo 'selected' ?>><?php print _('no'); ?></option>
10971097
</select>
10981098
<br><br>
10991099
</td>

web/templates/admin/list_log.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
</div>
1515
<div class="l-unit-toolbar__buttonstrip float-right">
1616
<a href="javascript:location.reload();" class="ui-button cancel" dir="ltr"><i class="fas fa-redo status-icon green"></i><?=_('Refresh')?></a>
17-
<? if (($_SESSION['userContext'] === 'admin') && ($_SESSION['user'] !== 'admin') && ($_SESSION['POLICY_SYSTEM_PROTECTED_ADMIN'] === 'yes')) {?>
17+
<? if (($_SESSION['userContext'] === 'admin') && ($_SESSION['look'] === 'admin') && ($_SESSION['POLICY_SYSTEM_PROTECTED_ADMIN'] === 'yes')) {?>
1818
<!-- Hide delete buttons-->
1919
<? } else { ?>
2020
<? if (($_SESSION['userContext'] === 'admin') || (($_SESSION['userContext'] === 'user') && ($_SESSION['POLICY_USER_DELETE_LOGS'] !== 'no'))) {?>

web/templates/admin/list_log_auth.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
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>
88
<? if (($_SESSION['userContext'] === 'admin') && ($_SESSION['look'] === 'admin') && ($_SESSION['POLICY_SYSTEM_PROTECTED_ADMIN'] === 'yes')) {?>
9-
<!-- Hide delete buttons-->
9+
<!-- Hide delete buttons-->
1010
<? } else { ?>
1111
<? if (($_SESSION['userContext'] === 'admin') || (($_SESSION['userContext'] === 'user') && ($_SESSION['POLICY_USER_DELETE_LOGS'] !== 'no'))) {?>
1212
<div class="actions-panel display-inline-block" key-action="js">

0 commit comments

Comments
 (0)