fix not possible to invite groups you are not a member of

This commit is contained in:
Ralf Becker 2016-06-27 11:39:25 +02:00
parent 9aa98a46a5
commit 0a2b637f00
4 changed files with 7 additions and 15 deletions

View File

@ -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'))
{

View File

@ -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
}});
},

View File

@ -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;

View File

@ -2,8 +2,8 @@
<!--
Egroupware
@license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
@package
@subpackage
@package
@subpackage
@link http://www.egroupware.org
@author Nathan Gray
@version $Id$
@ -29,11 +29,7 @@ if(view_change >= 0) {update.view = app.calendar.sidebox_changes_views[view_chan
<textbox type="hidden" id="first"/>
<textbox type="hidden" id="last"/>
<select-cat id="cat_id" empty_label="All categories" width="86%" onchange="app.calendar.update_state({cat_id: widget.getValue()});" expand_multiple_rows="4"/>
<calendar-owner id="owner" class="et2_fullWidth" onchange="app.calendar.update_state({owner: widget.getValue()}); return false;" multiple="true" allowFreeEntries="false"/>
<!--
<taglist id="owner" class="et2_fullWidth" onchange="app.calendar.update_state({owner: widget.getValue()});" autocomplete_params=''/>
-->
<calendar-owner id="owner" class="et2_fullWidth" onchange="app.calendar.update_state({owner: widget.getValue()}); return false;" multiple="true" allowFreeEntries="false" autocomplete_params="{&quot;checkgrants&quot;: true}"/>
<select id="status_filter" no_lang="true" class="et2_fullWidth" onchange="app.calendar.update_state({status_filter: widget.getValue()});"/>
<select id="merge" empty_label="Insert in document" onchange="app.calendar.sidebox_merge" class="et2_fullWidth"/>
</vbox>