1
0
mirror of https://github.com/EGroupware/egroupware.git synced 2024-12-30 18:49:24 +01:00

Fix add distribution list doesn't work if add_default gets set as default/forced by admin

This commit is contained in:
Hadi Nategh 2016-09-15 17:37:04 +02:00
parent a7d8130c54
commit e8538bb3da

View File

@ -943,7 +943,14 @@ window.egw_LAB.wait(function() {
{
// Set owner to current user, if not set
$owner = $_owner ? $_owner : $GLOBALS['egw_info']['user']['account_id'];
// if admin forced or set default for add_default pref
// consider default_addressbook as owner which already
// covered all cases in contacts class.
if ($owner == (int)$GLOBALS['egw']->preferences->default['addressbook']['add_default'] ||
$owner == (int)$GLOBALS['egw']->preferences->forced['addressbook']['add_default'])
{
$owner = $this->default_addressbook;
}
// Check for valid list & permissions
if(!(int)$list_id && !$this->check_list(null,EGW_ACL_ADD|EGW_ACL_EDIT,$owner))
{