Merge pull request #8835 from nextcloud/fix/noid/ldap_existence_check

group existence check works without attribute (like with users)
This commit is contained in:
Morris Jobke 2018-03-16 09:31:49 +01:00 committed by GitHub
commit f83aa58d1f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -472,6 +472,7 @@ class Access extends LDAPUtility implements IUserTools {
*
* @param string[] $groupDNs
* @return string[]
* @throws ServerNotAvailableException
*/
public function groupsMatchFilter($groupDNs) {
$validGroupDNs = [];
@ -492,7 +493,7 @@ class Access extends LDAPUtility implements IUserTools {
continue;
}
$result = $this->readAttribute($dn, 'cn', $this->connection->ldapGroupFilter);
$result = $this->readAttribute($dn, '', $this->connection->ldapGroupFilter);
if(is_array($result)) {
$this->connection->writeToCache($cacheKey, true);
$validGroupDNs[] = $dn;