Merge pull request #8849 from nextcloud/backport/8835/stable13

[stable13] group existence check works without attribute (like with users)
This commit is contained in:
Roeland Jago Douma 2018-03-16 14:25:18 +01:00 committed by GitHub
commit 9117a982f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

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