mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 07:53:39 +01:00
Check record-level permissions
This commit is contained in:
parent
3d45c7193b
commit
a5f5930064
@ -1204,13 +1204,16 @@ class Contacts extends Contacts\Storage
|
|||||||
{
|
{
|
||||||
$access = !!array_intersect($memberships,$GLOBALS['egw']->accounts->memberships($contact['account_id'],true));
|
$access = !!array_intersect($memberships,$GLOBALS['egw']->accounts->memberships($contact['account_id'],true));
|
||||||
}
|
}
|
||||||
|
else if ($contact['id'] && $GLOBALS['egw']->acl->check('A'.$contact['id'], $needed, 'addressbook'))
|
||||||
|
{
|
||||||
|
$access = true;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$access = ($grants[$owner] & $needed) &&
|
$access = ($grants[$owner] & $needed) &&
|
||||||
(!$contact['private'] || ($grants[$owner] & Acl::PRIVAT) || in_array($owner,$memberships));
|
(!$contact['private'] || ($grants[$owner] & Acl::PRIVAT) || in_array($owner,$memberships));
|
||||||
}
|
}
|
||||||
//error_log(__METHOD__."($needed,$contact[id],$deny_account_delete,$user) returning ".array2string($access));
|
//error_log(__METHOD__."($needed,$contact[id],$deny_account_delete,$user) returning ".array2string($access));
|
||||||
return true;
|
|
||||||
return $access;
|
return $access;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user