示例#1
0
// foreach($auth->getGroupsList() as $grp) {
// $data = $auth->getGroupData($app_code, $gr_name, $getLockupData=false) {
// }
// } else {
// $groupsList = $auth->getGroupsList();
// }
$groupsList = $auth->getGroupsList();
//print_r($groupsList);
$permList = $auth->getACNamesList(null, array('order' => 'ac_type, ac_order, app_code, ac_verb, ac_name, ac_active'));
if (is_array($appList)) {
    foreach ($appList as $appKey => $appVal) {
        $grp = array();
        $perm = array();
        $perm_n = array();
        $tmpini = new R3DBIni($mdb2, $auth_options, DOMAIN_NAME, $appKey);
        $max_groups = $tmpini->getValue('USER_MANAGER', 'MAX_GROUPS', '');
        $group_mandatory = $tmpini->getValue('USER_MANAGER', 'GROUPS_MANDATORY', '');
        $has_user_perm = $tmpini->getValue('USER_MANAGER', 'HAS_USER_PERM', '');
        $has_user_perm_negate = $tmpini->getValue('USER_MANAGER', 'HAS_USER_PERM_NEGATE', '');
        $default_group = $tmpini->getValue('USER_MANAGER', 'DEFAULT_GROUP', '');
        /** groups */
        if ($max_groups != '0') {
            foreach ($groupsList as $grpVal) {
                // echo "[$appKey]";
                if ($grpVal['app_code'] == $appKey) {
                    // echo $grpVal['app_code'] . $grpVal['gr_name'] . "\n";
                    //if ($_REQUEST['act'] != 'add' || $auth->hasAllPermsOfGroup($grpVal['app_code'], $grpVal['gr_name'])) {
                    if ($auth->hasPerm('SHOW', 'ALL_GROUPS') == 'T' || $auth->hasAllPermsOfGroup($grpVal['app_code'], $grpVal['gr_name'])) {
                        // echo $grpVal['app_code'], $grpVal['gr_name'] . "<br />\n";
                        if ($_REQUEST['act'] == 'add') {
                            $status = $grpVal['gr_name'] == $default_group ? 'ON' : 'OFF';
示例#2
0
 public function getConfigValueFor($dn_name = null, $app_code = null, $us_login = null, $se_section = null, $se_param = null, $default = null)
 {
     $dbini = new R3DBIni($this->db, $this->options['options'], $dn_name, $app_code, $us_login);
     return $dbini->getValue($se_section, $se_param, $default);
 }