mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-27 09:09:04 +01:00
* Addressbook/eSync/CardDAV: fixed not working (forced) preference to display only accounts of groupmembers, causing eSync to permanently try and fail reading other accounts
This commit is contained in:
parent
2a791a2f8a
commit
5755457b04
@ -264,21 +264,6 @@ class addressbook_so
|
|||||||
), 'pk' => array(), 'fk' => array(), 'ix' => array(), 'uc' => array(),
|
), 'pk' => array(), 'fk' => array(), 'ix' => array(), 'uc' => array(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
// add grants for accounts: if account_selection not in ('none','groupmembers'): everyone has read access,
|
|
||||||
// if he has not set the hide_accounts preference
|
|
||||||
// ToDo: be more specific for 'groupmembers', they should be able to see the groupmembers
|
|
||||||
if (!in_array($GLOBALS['egw_info']['user']['preferences']['common']['account_selection'],array('none','groupmembers')))
|
|
||||||
{
|
|
||||||
$this->grants[0] = EGW_ACL_READ;
|
|
||||||
}
|
|
||||||
// add account grants for admins
|
|
||||||
if ($this->is_admin()) // admin rights can be limited by ACL!
|
|
||||||
{
|
|
||||||
$this->grants[0] = EGW_ACL_READ; // admins always have read-access
|
|
||||||
if (!$GLOBALS['egw']->acl->check('account_access',16,'admin')) $this->grants[0] |= EGW_ACL_EDIT;
|
|
||||||
// no add at the moment if (!$GLOBALS['egw']->acl->check('account_access',4,'admin')) $this->grants[0] |= EGW_ACL_ADD;
|
|
||||||
if (!$GLOBALS['egw']->acl->check('account_access',32,'admin')) $this->grants[0] |= EGW_ACL_DELETE;
|
|
||||||
}
|
|
||||||
// ToDo: it should be the other way arround, the backend should set the grants it uses
|
// ToDo: it should be the other way arround, the backend should set the grants it uses
|
||||||
$this->somain->grants =& $this->grants;
|
$this->somain->grants =& $this->grants;
|
||||||
|
|
||||||
@ -344,9 +329,21 @@ class addressbook_so
|
|||||||
// therefor the param false!
|
// therefor the param false!
|
||||||
$grants = $GLOBALS['egw']->acl->get_grants($contact_app,false,$user);
|
$grants = $GLOBALS['egw']->acl->get_grants($contact_app,false,$user);
|
||||||
}
|
}
|
||||||
// grants for accounts: everyone read, admins edit, no-one add or delete (only via admin app!)
|
// add grants for accounts: if account_selection not in ('none','groupmembers'): everyone has read access,
|
||||||
|
// if he has not set the hide_accounts preference
|
||||||
|
// ToDo: be more specific for 'groupmembers', they should be able to see the groupmembers
|
||||||
|
if (!in_array($GLOBALS['egw_info']['user']['preferences']['common']['account_selection'], array('none','groupmembers')))
|
||||||
|
{
|
||||||
$grants[0] = EGW_ACL_READ;
|
$grants[0] = EGW_ACL_READ;
|
||||||
if ($this->is_admin()) $grants[0] |= EGW_ACL_EDIT;
|
}
|
||||||
|
// add account grants for admins
|
||||||
|
if ($this->is_admin()) // admin rights can be limited by ACL!
|
||||||
|
{
|
||||||
|
$grants[0] = EGW_ACL_READ; // admins always have read-access
|
||||||
|
if (!$GLOBALS['egw']->acl->check('account_access',16,'admin')) $grants[0] |= EGW_ACL_EDIT;
|
||||||
|
// no add at the moment if (!$GLOBALS['egw']->acl->check('account_access',4,'admin')) $this->grants[0] |= EGW_ACL_ADD;
|
||||||
|
if (!$GLOBALS['egw']->acl->check('account_access',32,'admin')) $grants[0] |= EGW_ACL_DELETE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user