Exemplo n.º 1
0
                }
            }
        }
        $permissionApplier->apply($set);
        $smarty->assign('perms_clipboard_source', '');
    }
}
// Prepare display
// Get the individual object permissions if any
$displayedPermissions = get_displayed_permissions();
//Quickperms apply {{{
//Test to map permissions of ile galleries into read write admin admin levels.
if ($prefs['feature_quick_object_perms'] == 'y') {
    $qperms = quickperms_get_data();
    $smarty->assign('quickperms', $qperms);
    $quickperms = new Perms_Reflection_Quick();
    foreach ($qperms as $type => $data) {
        $quickperms->configure($type, $data['data']);
    }
    $groupNames = array();
    foreach ($groups['data'] as $key => $group) {
        $groupNames[] = $group['groupName'];
    }
    $map = $quickperms->getAppliedPermissions($displayedPermissions, $groupNames);
    foreach ($groups['data'] as $key => $group) {
        $groups['data'][$key]['groupSumm'] = $map[$group['groupName']];
    }
    if (isset($_REQUEST['assign']) && isset($_REQUEST['quick_perms'])) {
        check_ticket('object-perms');
        $groups = $userlib->get_groups(0, -1, 'groupName_asc', '', '', 'n');
        $userInput = array();
Exemplo n.º 2
0
    foreach ($group_filter as $i => $group) {
        $ginfo = $userlib->get_group_info($group);
        $group_filter[$i] = $ginfo['id'];
    }
    $cookietab = 1;
}
// Quick perms load {{{
//Quickperm groups stuff
if ($prefs['feature_quick_object_perms'] == 'y') {
    $groupNames = array();
    foreach ($groups['data'] as $key => $group) {
        $groupNames[] = $group['groupName'];
    }
    $qperms = quickperms_get_data();
    $smarty->assign('quickperms', $qperms);
    $quickperms = new Perms_Reflection_Quick();
    foreach ($qperms as $type => $data) {
        $quickperms->configure($type, $data['data']);
    }
    $displayedPermissions = get_displayed_permissions();
    $map = $quickperms->getAppliedPermissions($displayedPermissions, $groupNames);
    foreach ($groups['data'] as $key => $group) {
        $groups['data'][$key]['groupSumm'] = $map[$group['groupName']];
    }
}
//Quickperm END }}}
// get groupNames etc - TODO: jb will tidy...
//$checkboxInfo = array();
$permGroups = array();
$groupNames = array();
$groupIndices = array();
Exemplo n.º 3
0
 function testRegisterUserDefinedIsIgnored()
 {
     $quick = new Perms_Reflection_Quick();
     $quick->configure('userdefined', array('view'));
     $expect = new Perms_Reflection_Quick();
     $this->assertEquals($expect, $quick);
 }