mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 14:41:29 +01:00
if user selection is switched to "no user selection at all", do not include users in calendar owner search results
This commit is contained in:
parent
181546cdb5
commit
7e25d8fdda
@ -173,6 +173,7 @@ class calendar_owner_etemplate_widget extends Etemplate\Widget\Taglist
|
|||||||
'filter' => array('account_id' => null)) +
|
'filter' => array('account_id' => null)) +
|
||||||
$search_options;
|
$search_options;
|
||||||
$results = array();
|
$results = array();
|
||||||
|
$is_admin = !!($GLOBALS['egw_info']['user']['apps']['admin']);
|
||||||
|
|
||||||
// Contacts matching accounts the user does not have permission for cause
|
// Contacts matching accounts the user does not have permission for cause
|
||||||
// confusion as user selects the contact and there's nothing there, so
|
// confusion as user selects the contact and there's nothing there, so
|
||||||
@ -186,8 +187,8 @@ class calendar_owner_etemplate_widget extends Etemplate\Widget\Taglist
|
|||||||
$mapped = array();
|
$mapped = array();
|
||||||
$_results = array();
|
$_results = array();
|
||||||
|
|
||||||
// Handle Api\Accounts separately
|
// Handle Api\Accounts separately, if user is allowed to see accounts
|
||||||
if($type == '')
|
if($type == '' && ($is_admin || !$is_admin && $GLOBALS['egw_info']['user']['preferences']['common']['account_selection'] !== 'none'))
|
||||||
{
|
{
|
||||||
$owngroup_options = $options+array('account_type'=>'owngroups');
|
$owngroup_options = $options+array('account_type'=>'owngroups');
|
||||||
$own_groups = Api\Accounts::link_query('',$owngroup_options);
|
$own_groups = Api\Accounts::link_query('',$owngroup_options);
|
||||||
|
Loading…
Reference in New Issue
Block a user