* Resources: fix PHP Fatal call to undefined method Api\Accounts::get_list() when editing ACL

This commit is contained in:
Ralf Becker 2016-06-13 14:52:49 +02:00
parent c3c5b7cafa
commit 6c87e540d6

View File

@ -244,9 +244,8 @@ class resources_acl_bo
$GLOBALS['egw']->acl->delete_repository('resources','L' . $cat_id,false); $GLOBALS['egw']->acl->delete_repository('resources','L' . $cat_id,false);
foreach($GLOBALS['egw']->accounts->get_list() as $num => $account) foreach(array_unique(array_intersect($readcat, $writecat, $calreadcat, $calbookcat, $admincat)) as $account_id)
{ {
$account_id = $account['account_id'];
$rights = false; $rights = false;
$rights = in_array($account_id,$readcat) ? ($rights | Acl::READ) : false; $rights = in_array($account_id,$readcat) ? ($rights | Acl::READ) : false;
$rights = in_array($account_id,$writecat) ? ($rights | Acl::READ | Acl::ADD | Acl::EDIT | Acl::DELETE): $rights; $rights = in_array($account_id,$writecat) ? ($rights | Acl::READ | Acl::ADD | Acl::EDIT | Acl::DELETE): $rights;