diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2007-12-01 01:34:42 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2007-12-01 01:34:42 +0000 |
commit | 951224f297b6a7711aaa9572bbd3614249e26c9d (patch) | |
tree | a14187f8b2ab1598e893100d9a79bf6c3e8188f2 | |
parent | ac09997e9460ae263769dc7bef990563451ac92d (diff) | |
download | pfsense-951224f297b6a7711aaa9572bbd3614249e26c9d.zip pfsense-951224f297b6a7711aaa9572bbd3614249e26c9d.tar.gz |
If the groupname is in use, do not allow the name to be edited.
-rw-r--r-- | usr/local/www/system_groupmanager.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/usr/local/www/system_groupmanager.php b/usr/local/www/system_groupmanager.php index c1f5aab..a249d9b 100644 --- a/usr/local/www/system_groupmanager.php +++ b/usr/local/www/system_groupmanager.php @@ -246,7 +246,19 @@ if($_GET['act']=="new" || $_GET['act']=="edit"){ <tr> <td width="22%" valign="top" class="vncellreq">Group name</td> <td width="78%" class="vtable"> + <?php + $inuse = false; + foreach($config['system']['user'] as $su) { + if($su['groupname'] == $pconfig['name']) + $inuse = true; + } + ?> + <?php if($inuse == false): ?> <input name="groupname" type="text" class="formfld" id="groupname" size="20" value="<?=htmlspecialchars($pconfig['name']);?>"> + <?php else: ?> + <?php echo $pconfig['name'] . "*"; ?> + <input name="groupname" type="hidden" class="formfld" id="groupname" value="<?=htmlspecialchars($pconfig['name']);?>"> + <?php endif; ?> </td> </tr> <tr> |