Only filter accounts by calendar permission, not groups

This commit is contained in:
Nathan Gray 2016-03-10 17:43:02 +00:00
parent 1d03c28ba0
commit fbe3d2cc7d

View File

@ -50,9 +50,13 @@ class calendar_owner_etemplate_widget extends etemplate_widget_taglist
foreach($list as $type)
{
$account_options = array('account_type' => $type);
$accounts += accounts::link_query('',$account_options);
$accounts_type = accounts::link_query('',$account_options);
if($type == 'accounts')
{
$accounts_type = array_intersect_key($accounts_type, $GLOBALS['egw']->acl->get_grants('calendar'));
}
$accounts += $accounts_type;
}
$accounts = array_intersect_key($accounts, $GLOBALS['egw']->acl->get_grants('calendar'));
$sel_options += array_map(
function($account_id, $account_name) {
return array(