summaryrefslogtreecommitdiffstats
path: root/usr/local/www/system_usermanager.php
diff options
context:
space:
mode:
authorsullrich <sullrich@pfsense.org>2009-11-27 19:02:39 -0500
committersullrich <sullrich@pfsense.org>2009-11-27 19:02:57 -0500
commitb4bfd25dc6804c288cd8ea804e0f5844899498fa (patch)
tree4b838b0ba8cc48b3023eee5193bbc1e8360c6d16 /usr/local/www/system_usermanager.php
parente7d3b8f4b8aa428882dd1f955027af8580690010 (diff)
downloadpfsense-b4bfd25dc6804c288cd8ea804e0f5844899498fa.zip
pfsense-b4bfd25dc6804c288cd8ea804e0f5844899498fa.tar.gz
Add disabled checkbox. Add code to check for disabled accounts.
Diffstat (limited to 'usr/local/www/system_usermanager.php')
-rw-r--r--usr/local/www/system_usermanager.php20
1 files changed, 17 insertions, 3 deletions
diff --git a/usr/local/www/system_usermanager.php b/usr/local/www/system_usermanager.php
index b3403e9..9ff460b 100644
--- a/usr/local/www/system_usermanager.php
+++ b/usr/local/www/system_usermanager.php
@@ -158,6 +158,7 @@ if (isAllowedPage("system_usermanager")) {
$pconfig['uid'] = $a_user[$id]['uid'];
$pconfig['authorizedkeys'] = base64_decode($a_user[$id]['authorizedkeys']);
$pconfig['priv'] = $a_user[$id]['priv'];
+ $pconfig['disabled'] = isset($a_user[$id]['disabled']);
}
}
@@ -252,6 +253,11 @@ if (isAllowedPage("system_usermanager")) {
$userent['fullname'] = $_POST['fullname'];
$userent['expires'] = $_POST['expires'];
$userent['authorizedkeys'] = base64_encode($_POST['authorizedkeys']);
+
+ if($_POST['disabled'])
+ $userent['disabled'] = true;
+ else
+ unset($userent['disabled']);
if (isset($id) && $a_user[$id])
$a_user[$id] = $userent;
@@ -372,6 +378,12 @@ function presubmit() {
</td>
</tr>
<tr>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Disabled");?></td>
+ <td width="78%" class="vtable">
+ <input name="disabled" type="checkbox" id="disabled" <?php if($pconfig['disabled']) echo "CHECKED"; ?>>
+ </td>
+ </tr>
+ <tr>
<td width="22%" valign="top" class="vncellreq"><?=gettext("Username");?></td>
<td width="78%" class="vtable">
<input name="usernamefld" type="text" class="formfld user" id="usernamefld" size="20" value="<?=htmlspecialchars($pconfig['usernamefld']);?>" <?=$ro;?>/>
@@ -601,7 +613,8 @@ function presubmit() {
<tr>
<td width="25%" class="listhdrr">Username</td>
<td width="25%" class="listhdrr">Full name</td>
- <td width="30%" class="listhdrr">Groups</td>
+ <td width="5%" class="listhdrr">Disabled</td>
+ <td width="25%" class="listhdrr">Groups</td>
<td width="10%" class="list"></td>
</tr>
<?php
@@ -628,6 +641,7 @@ function presubmit() {
</table>
</td>
<td class="listr"><?=htmlspecialchars($userent['fullname']);?>&nbsp;</td>
+ <td class="listr"><?php if(isset($userent['disabled'])) echo "*"; ?></td>
<td class="listbg">
<?=implode(",",local_user_get_groups($userent));?>
&nbsp;
@@ -649,7 +663,7 @@ function presubmit() {
endforeach;
?>
<tr>
- <td class="list" colspan="3"></td>
+ <td class="list" colspan="4"></td>
<td class="list">
<a href="system_usermanager.php?act=new">
<img src="/themes/<?= $g['theme'];?>/images/icons/icon_plus.gif" title="add user" alt="add user" width="17" height="17" border="0" />
@@ -657,7 +671,7 @@ function presubmit() {
</td>
</tr>
<tr>
- <td colspan="3">
+ <td colspan="4">
<p>
<?=gettext("Additional webConfigurator users can be added here.");?>
<?=gettext("User permissions can be assinged diretly or inherited from group memberships.");?>
OpenPOWER on IntegriCloud