Ejemplo n.º 1
0
    //unset all rights for users and groups, that are no more a favourit
    $rights->unset_rights_nofavourit($all);
    foreach ($all as $entity) {
        //unset rights to set new rights
        $rights->unset_rights($entity);
        if (isset($post["edit_" . $entity->get_id()]) && $publish == "user") {
            $rights->set_rights_edit($entity);
        } else {
            $set = false;
            //important set at first the evaluate rights and then fill out rights
            if (isset($post["evaluate_" . $entity->get_id()]) && $publish == "user") {
                $rights->set_rights_evaluate($entity);
                $set = true;
            }
            if (isset($post["fillout_" . $entity->get_id()]) && ($publish == "user" || $publish == "public")) {
                $rights->set_rights_fillout($entity);
                $set = true;
            }
            if (!$set) {
                $rights->unset_rights($entity);
            }
        }
    }
    //close window
    $steam->disconnect();
    die("<html>\n<body onload='javascript:window.close();'>\n</body>\n</html>");
    exit;
}
//get data for the table
//get rights for own groups
foreach ($groups as $group) {