Commit 9571738e authored by lphuberdeau's avatar lphuberdeau

[FIX] Forgot to remove these exceptions that used to be required

parent 2d46b065
......@@ -4128,18 +4128,14 @@ class TikiLib extends TikiDb_Bridge {
// - category permission
// if O.K. this function shall replace similar constructs in list_pages and other functions above.
// $categperm is the category permission that should grant $perm. if none, pass 0
function user_has_perm_on_object($toCheck,$object,$objtype,$perm,$categperm='tiki_p_view_categorized') {
global $userlib, $globalPermRules, $user;
function user_has_perm_on_object($user,$object,$objtype,$perm,$categperm='tiki_p_view_categorized') {
global $userlib;
$groups = $userlib->get_user_groups( $toCheck );
$context = array( 'type' => $objtype, 'object' => $object );
if( $toCheck == $user ) {
$accessor = Perms::get( $context );
} else {
$accessor = $globalPermRules->getAccessor( $context );
$accessor->setGroups( $groups );
}
$accessor = Perms::get( $context );
$accessor->setGroups( $groups );
return $accessor->$perm;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment