From 1fab6876c483508046202edfeaa71f4cec8e586d Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Thu, 23 Jun 2016 15:49:44 +0200 Subject: [PATCH] Fix calendar participant does not show user accounts --- .../inc/class.calendar_owner_etemplate_widget.inc.php | 4 ++-- calendar/js/app.js | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/calendar/inc/class.calendar_owner_etemplate_widget.inc.php b/calendar/inc/class.calendar_owner_etemplate_widget.inc.php index 99b87241f9..8d87ace29f 100644 --- a/calendar/inc/class.calendar_owner_etemplate_widget.inc.php +++ b/calendar/inc/class.calendar_owner_etemplate_widget.inc.php @@ -155,7 +155,7 @@ class calendar_owner_etemplate_widget extends Etemplate\Widget\Taglist $account_options = $options + array('account_type' => $a_type); $_results += Api\Accounts::link_query($query,$account_options); } - $_results = array_intersect_key($_results, $GLOBALS['egw']->acl->get_grants('calendar')); + if (!$options['exec']['nocheckgrants']) $_results = array_intersect_key($_results, $GLOBALS['egw']->acl->get_grants('calendar')); } else if ($data['app'] && Link::get_registry($data['app'], 'query')) { @@ -209,7 +209,7 @@ class calendar_owner_etemplate_widget extends Etemplate\Widget\Taglist { $resource = $bo->resources[substr($id, 0,1)]; $label = Link::title($resource['app'], substr($id,1)); - + // Could not get via link, try via resources info if($label === false) { diff --git a/calendar/js/app.js b/calendar/js/app.js index 5e982dcbc4..f8105ca9aa 100644 --- a/calendar/js/app.js +++ b/calendar/js/app.js @@ -1060,7 +1060,8 @@ app.classes.calendar = (function(){ "use strict"; return AppJS.extend( start: content.start, end: content.end, duration: content.duration, - whole_day: content.whole_day + whole_day: content.whole_day, + nocheckgrants: true }}); }, @@ -2030,7 +2031,7 @@ app.classes.calendar = (function(){ "use strict"; return AppJS.extend( ); var loading = false; - + var value = []; state.state.first = view.start_date(state.state).toJSON(); @@ -2423,7 +2424,7 @@ app.classes.calendar = (function(){ "use strict"; return AppJS.extend( { view.etemplates[i].resize(); } - + // If we need to fetch data from the server, it will hide the loader // when done but if everything is in the cache, hide from here. if(!loading) @@ -2433,7 +2434,7 @@ app.classes.calendar = (function(){ "use strict"; return AppJS.extend( egw.loading_prompt(this.appname,false); },this),500); } - + return; } // old calendar state handling on server-side (incl. switching to and from listview)