only a superuser can access the access controls for users

This commit is contained in:
james 2005-02-16 22:55:37 +00:00
parent 3deae5e029
commit 82780d85f8

View File

@ -278,17 +278,20 @@ if($_GET['edit'] || $edit)
echo "<tr><td>".i18n("Phone (Work)").":</td><td><input size=\"15\" type=\"text\" name=\"phonework\" value=\"$r->phonework\" /></td></tr>\n";
echo "<tr><td>".i18n("Phone (Cell)").":</td><td><input size=\"15\" type=\"text\" name=\"phonecell\" value=\"$r->phonecell\" /></td></tr>\n";
echo "<tr><td>".i18n("Fax").":</td><td><input size=\"15\" type=\"text\" name=\"fax\" value=\"$r->fax\" /></td></tr>\n";
echo "<tr><td align=\"center\" colspan=\"2\"><hr /></td></tr>";
echo "<tr><td>".i18n("Access Controls").":</td><td>";
if($r->access_admin=="Y") $checked="checked=\"checked\""; else $checked="";
echo "<input type=\"checkbox\" name=\"access_admin\" value=\"Y\" $checked /> ".i18n("Administration")."<br />";
if($r->access_config=="Y") $checked="checked=\"checked\""; else $checked="";
echo "<input type=\"checkbox\" name=\"access_config\" value=\"Y\" $checked /> ".i18n("Configuration")."<br />";
if($r->access_super=="Y") $checked="checked=\"checked\""; else $checked="";
echo "<input type=\"checkbox\" name=\"access_super\" value=\"Y\" $checked /> ".i18n("Superuser")."<br />";
if(auth_has_access("super"))
{
echo "<tr><td align=\"center\" colspan=\"2\"><hr /></td></tr>";
echo "<tr><td>".i18n("Access Controls").":</td><td>";
if($r->access_admin=="Y") $checked="checked=\"checked\""; else $checked="";
echo "<input type=\"checkbox\" name=\"access_admin\" value=\"Y\" $checked /> ".i18n("Administration")."<br />";
if($r->access_config=="Y") $checked="checked=\"checked\""; else $checked="";
echo "<input type=\"checkbox\" name=\"access_config\" value=\"Y\" $checked /> ".i18n("Configuration")."<br />";
if($r->access_super=="Y") $checked="checked=\"checked\""; else $checked="";
echo "<input type=\"checkbox\" name=\"access_super\" value=\"Y\" $checked /> ".i18n("Superuser")."<br />";
echo "</td></tr>";
echo "</td></tr>";
}
echo "<tr><td align=\"center\" colspan=\"2\">";