apple / ccs-calendarserver

The Calendar and Contacts Server.
https://www.calendarserver.org
Apache License 2.0
484 stars 136 forks source link

problems listing/matching groups #495

Closed f1-outsourcing closed 7 years ago

f1-outsourcing commented 7 years ago

When i refresh /principals/groups/

2017-06-27T22:39:51+0200 [directoryproxy] [txdav.dps.server#debug] RecordsWithRecordType: group 2017-06-27T22:39:51+0200 [directoryproxy] [twext.who.ldap._service.DirectoryService#debug] Performing LDAP query: [[('ou', 'xxx', 1)], [('ou', 'xxx', 1)], [('ou', 'xxx', 1)], [('dc', 'xxx', 1)], [('dc', 'xxx', 1)], [('dc', 'local', 1)]] (&(objectClass=groupOfNames)(uid=)) 2017-06-27T22:39:51+0200 [directoryproxy] [twext.who.ldap._service.DirectoryService#debug] Records from LDAP query ([[('ou', 'xxx', 1)], [('ou', 'xxx', 1)], [('ou', 'xxx', 1)], [('dc', 'xxx', 1)], [('dc', 'xxx', 1)], [('dc', 'local', 1)]] (uid=) ): 0 2017-06-27T22:39:51+0200 [directoryproxy] [twext.who.ldap._service.DirectoryService#debug] LDAP result count ((uid=*)): 0 2017-06-27T22:39:51+0200 [caldav-0] [txdav.dps.client#debug] DPS call <class 'txdav.dps.commands.RecordsWithRecordTypeCommand'> duration=5.97ms, results=0

it adds uid to the ldap query while i dont even have this in the objectclass, and as far as i know not even in the configuration file.

how can i change this to uid to cn or gid? Is it possible to have different mappings for group and users in the config, because these are all defined 'at the same level'

dreness commented 7 years ago

You may be getting default attribute mappings. To understand why 'uid' is appearing in the query, try fully defining all the relevant config, if you're not already doing that, using something like what is seen here: https://github.com/apple/ccs-calendarserver/blob/master/doc/Admin/DirectoryService-LDAP.rst

We don't support per-record-type mappings (although we once did; this was simplified around the time of twext.who I think), but we do support per-record-type extra filters.

f1-outsourcing commented 7 years ago

thanks, i was hoping for the per record type mapping, i solved it by adding uidObject class