From 0a2b637f00c35d28b30a7abfb9889520d60f2c96 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Mon, 27 Jun 2016 11:39:25 +0200 Subject: [PATCH] fix not possible to invite groups you are not a member of --- .../inc/class.calendar_owner_etemplate_widget.inc.php | 10 +++------- calendar/js/app.js | 1 - calendar/js/et2_widget_owner.js | 1 + calendar/templates/default/sidebox.xet | 10 +++------- 4 files changed, 7 insertions(+), 15 deletions(-) diff --git a/calendar/inc/class.calendar_owner_etemplate_widget.inc.php b/calendar/inc/class.calendar_owner_etemplate_widget.inc.php index 8d87ace29f..babe7d62d9 100644 --- a/calendar/inc/class.calendar_owner_etemplate_widget.inc.php +++ b/calendar/inc/class.calendar_owner_etemplate_widget.inc.php @@ -149,13 +149,9 @@ class calendar_owner_etemplate_widget extends Etemplate\Widget\Taglist // Handle Api\Accounts seperately if($type == '') { - $list = array('accounts', 'owngroups'); - foreach($list as $a_type) - { - $account_options = $options + array('account_type' => $a_type); - $_results += Api\Accounts::link_query($query,$account_options); - } - if (!$options['exec']['nocheckgrants']) $_results = array_intersect_key($_results, $GLOBALS['egw']->acl->get_grants('calendar')); + $account_options = $options + array('account_type' => 'both'); + $_results += Api\Accounts::link_query($query, $account_options); + if (!empty($_REQUEST['checkgrants'])) $_results = array_intersect_key($_results, $GLOBALS['egw']->acl->get_grants('calendar')); } else if ($data['app'] && Link::get_registry($data['app'], 'query')) { diff --git a/calendar/js/app.js b/calendar/js/app.js index 5eac388c88..323a1e44ba 100644 --- a/calendar/js/app.js +++ b/calendar/js/app.js @@ -1061,7 +1061,6 @@ app.classes.calendar = (function(){ "use strict"; return AppJS.extend( end: content.end, duration: content.duration, whole_day: content.whole_day, - nocheckgrants: true }}); }, diff --git a/calendar/js/et2_widget_owner.js b/calendar/js/et2_widget_owner.js index b125e263a6..b524383a36 100644 --- a/calendar/js/et2_widget_owner.js +++ b/calendar/js/et2_widget_owner.js @@ -86,6 +86,7 @@ var et2_calendar_owner = (function(){ "use strict"; return et2_taglist_email.ext return label; } }, + getValue: function() { if(this.taglist == null) return null; diff --git a/calendar/templates/default/sidebox.xet b/calendar/templates/default/sidebox.xet index 41168c4477..dcd19c24ba 100644 --- a/calendar/templates/default/sidebox.xet +++ b/calendar/templates/default/sidebox.xet @@ -2,8 +2,8 @@ +