diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2007-12-02 03:14:41 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2007-12-02 03:14:41 +0000 |
commit | 30c8cd36b605913558d8c86e5fbd5395320f65ee (patch) | |
tree | fd41a1e5fec7a55bbedcf8dc36301f0a2ac11fa8 /etc | |
parent | ab6738c74344b572d25e325dcd669fa813a7a1e5 (diff) | |
download | pfsense-30c8cd36b605913558d8c86e5fbd5395320f65ee.zip pfsense-30c8cd36b605913558d8c86e5fbd5395320f65ee.tar.gz |
Kill off illegal offsets error and make code more readable while I am here.
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/pfsense-utils.inc | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc index ce2a6d8..c2e04a6 100644 --- a/etc/inc/pfsense-utils.inc +++ b/etc/inc/pfsense-utils.inc @@ -2151,17 +2151,25 @@ function get_disk_info() { function display_top_tabs(& $tab_array) { global $HTTP_SERVER_VARS; global $config; + + $auth_user = $HTTP_SERVER_VARS['AUTH_USER']; $groupindex = index_groups(); $userindex = index_users(); - $allowed = array (); + $auth_user_index = $userindex[$auth_user]; + $auth_user_group_index = $groupindex[$config['system']['user'][$auth_user_index]['groupname']]; - $allowed[] = ''; - if (!isSystemAdmin($HTTP_SERVER_VARS['AUTH_USER']) && isset ($config['system']['group'][$groupindex[$config['system']['user'][$userindex[$HTTP_SERVER_VARS['AUTH_USER']]]['groupname']]]['pages'][0]['page'])) { - $allowed = & $config['system']['group'][$groupindex[$config['system']['user'][$userindex[$HTTP_SERVER_VARS['AUTH_USER']]]['groupname']]]['pages'][0]['page']; - } + print_r($groupindex); + print_r($userindex); + print_r($HTTP_SERVER_VARS); + $allowed = array (); + $allowed[] = ''; + if (!isSystemAdmin($HTTP_SERVER_VARS['AUTH_USER'])) + if (isset($config['system']['group'][$groupindex[$config['system']['user'][$userindex[$auth_user]]['groupname']]]['pages'])) + $allowed = &$config['system']['group'][$groupindex[$config['system']['user'][$userindex[$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 |