fixed new contacts had accounts addressbook selected, if user has admin rights

This commit is contained in:
Ralf Becker 2014-03-24 13:23:03 +00:00
parent dba03454fb
commit c72591f4a2

View File

@ -1912,7 +1912,7 @@ window.egw_LAB.wait(function() {
$content['owner'] = $state['filter'];
}
$content['private'] = (int) ($content['owner'] && substr($content['owner'],-1) == 'p');
if (!($this->grants[$content['owner'] = (string) (int) $content['owner']] & EGW_ACL_ADD))
if ($content['owner'] === '' || !($this->grants[$content['owner'] = (string) (int) $content['owner']] & EGW_ACL_ADD))
{
$content['owner'] = $this->default_addressbook;
$content['private'] = (int)$this->default_private;