diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2007-12-03 01:49:59 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2007-12-03 01:49:59 +0000 |
commit | 3aae364d67669bb61c04bf2ad42475968b6882ca (patch) | |
tree | 55512ec29f7c4986045ed9abd4d70a1c9ea7c19f /etc/inc/pfsense-utils.inc | |
parent | f29117399b13880679e80ceda429ef66198c1465 (diff) | |
download | pfsense-3aae364d67669bb61c04bf2ad42475968b6882ca.zip pfsense-3aae364d67669bb61c04bf2ad42475968b6882ca.tar.gz |
Inherit allowed privs from $g['privs']
Diffstat (limited to 'etc/inc/pfsense-utils.inc')
-rw-r--r-- | etc/inc/pfsense-utils.inc | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc index 0b4c466..7a684e6 100644 --- a/etc/inc/pfsense-utils.inc +++ b/etc/inc/pfsense-utils.inc @@ -2145,21 +2145,9 @@ function get_disk_info() { function display_top_tabs(& $tab_array) { global $HTTP_SERVER_VARS; global $config; - global $allowed; - - $auth_user = $HTTP_SERVER_VARS['AUTH_USER']; - - $groupindex = index_groups(); - $userindex = index_users(); + global $g; + $allowed = $g['privs']; - if(!$allowed) { - $allowed = array (); - $allowed[] = ''; - if (isset($config['system']['group'][$groupindex[$config['system']['user'][$userindex[$HTTP_SERVER_VARS['AUTH_USER']]]['groupname']]]['pages'])) { - $allowed = &$config['system']['group'][$groupindex[$config['system']['user'][$userindex[$HTTP_SERVER_VARS['AUTH_USER']]]['groupname']]]['pages']; - } - } - /* does the user have access to this tab? * master user has access to everything. * if the user does not have access, simply @@ -3841,7 +3829,7 @@ function is_fqdn($fqdn) { if(preg_match("/\.\./", $fqdn)) { $hostname = false; } - if(preg_match("/^\./i", $fqdn)) { + if(preg_match("/^\./i", $fqdn)) { $hostname = false; } if(preg_match("/\//i", $fqdn)) { |