Skip to content

Commit b3c655a

Browse files
author
Kristan Kenney
committed
Add options to Edit Server
1 parent 0d05d54 commit b3c655a

File tree

2 files changed

+75
-0
lines changed

2 files changed

+75
-0
lines changed

web/edit/server/index.php

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -695,6 +695,39 @@
695695
}
696696
}
697697

698+
// Change POLICY_USER_EDIT_DETAILS
699+
if (empty($_SESSION['error_msg'])) {
700+
if ($_POST['v_policy_user_edit_details'] != $_SESSION['POLICY_USER_EDIT_DETAILS']) {
701+
exec (HESTIA_CMD."v-change-sys-config-value POLICY_USER_EDIT_DETAILS ".escapeshellarg($_POST['v_policy_user_edit_details']), $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_policy_user_edit_details'];
705+
$v_security_adv = 'yes';
706+
}
707+
}
708+
709+
// Change POLICY_USER_VIEW_LOGS
710+
if (empty($_SESSION['error_msg'])) {
711+
if ($_POST['v_policy_user_view_logs'] != $_SESSION['POLICY_USER_VIEW_LOGS']) {
712+
exec (HESTIA_CMD."v-change-sys-config-value POLICY_USER_VIEW_LOGS ".escapeshellarg($_POST['v_policy_user_view_logs']), $output, $return_var);
713+
check_return_code($return_var,$output);
714+
unset($output);
715+
if (empty($_SESSION['error_msg'])) $v_enforce_subdomain_ownership = $_POST['v_policy_user_view_logs'];
716+
$v_security_adv = 'yes';
717+
}
718+
}
719+
720+
// Change POLICY_USER_DELETE_LOGS
721+
if (empty($_SESSION['error_msg'])) {
722+
if ($_POST['v_policy_user_delete_logs'] != $_SESSION['POLICY_USER_DELETE_LOGS']) {
723+
exec (HESTIA_CMD."v-change-sys-config-value POLICY_USER_DELETE_LOGS ".escapeshellarg($_POST['v_policy_user_delete_logs']), $output, $return_var);
724+
check_return_code($return_var,$output);
725+
unset($output);
726+
if (empty($_SESSION['error_msg'])) $v_enforce_subdomain_ownership = $_POST['v_policy_user_delete_logs'];
727+
$v_security_adv = 'yes';
728+
}
729+
}
730+
698731
// Change RESTRICTED_ADMIN
699732
if (empty($_SESSION['error_msg'])) {
700733
if ($_POST['v_restrict_admin'] != $_SESSION['RESTRICTED_ADMIN']) {

web/templates/admin/edit_server.html

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1056,6 +1056,48 @@
10561056
</td>
10571057
</tr>
10581058
<?}?>
1059+
<tr>
1060+
<td class="vst-text input-label">
1061+
<?php print _('Users can edit their account details');?>
1062+
</td>
1063+
</tr>
1064+
<tr>
1065+
<td>
1066+
<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>
1069+
</select>
1070+
<br><br>
1071+
</td>
1072+
</tr>
1073+
<tr>
1074+
<td class="vst-text input-label">
1075+
<?php print _('Users can view their action and login history logs');?>
1076+
</td>
1077+
</tr>
1078+
<tr>
1079+
<td>
1080+
<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>
1083+
</select>
1084+
<br><br>
1085+
</td>
1086+
</tr>
1087+
<tr>
1088+
<td class="vst-text input-label">
1089+
<?php print _('Users can delete their action and login history logs');?>
1090+
</td>
1091+
</tr>
1092+
<tr>
1093+
<td>
1094+
<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>
1097+
</select>
1098+
<br><br>
1099+
</td>
1100+
</tr>
10591101
<tr>
10601102
<td class="vst-text input-label">
10611103
<?php print _('Inactive session timeout');?> (<?php print _('Minutes');?>)

0 commit comments

Comments
 (0)