Ensure we use existing attribute and entry level rights as returned from Net_LDAP3

This commit is contained in:
Jeroen van Meeuwen (Kolab Systems) 2019-10-29 13:13:31 +01:00
parent 5be98d7714
commit 1f836679c4

View file

@ -559,8 +559,11 @@ class kolab_auth extends rcube_plugin
$effective_rights = (array)$ldap->effective_rights($target_entry['dn']);
if (!empty($effective_rights)) {
$effective_rights['attrib'] = $effective_rights['attributeLevelRights'];
$effective_rights['entry'] = $effective_rights['entryLevelRights'];
// compat with out of date Net_LDAP3
$effective_rights = array_change_key_case($effective_rights, CASE_LOWER);
$effective_rights['attrib'] = $effective_rights['attributelevelrights'];
$effective_rights['entry'] = $effective_rights['entrylevelrights'];
// compare the rights with the permissions mapping
$allowed_tasks = array();