[CalendarServer-users] Users in LDAP: restrictEnabledRecords not working?

tobiasbp tobiasbp at gmail.com
Thu Aug 23 08:32:18 PDT 2012


I'm running calendarserver 3.2 with the packages available in Debian
Wheezy (Unstable). I have my users and groups in LDAP.

I can list my users and groups using the command
"calendarserver_manage_principals".

I would like to restrict calendar users to members of group "calendar_admins"


I update my caldavd.plist liek this:

<key>restrictEnabledRecords</key>
<true/>
<key>restrictToGroup</key>
<string>calendar_admins</string>


After the change, I can no longer list my users:

su caldavd -p -c "calendarserver_manage_principals --list-principals users"

Traceback (most recent call last):
  File "/usr/bin/calendarserver_manage_principals", line 32, in <module>
    main()
  File "/usr/lib/python2.7/dist-packages/calendarserver/tools/principals.py",
line 303, in main
    records = list(config.directory.listRecords(listPrincipals))
  File "/usr/lib/python2.7/dist-packages/twistedcaldav/directory/aggregate.py",
line 115, in listRecords
    records = self._query("listRecords", recordType)
  File "/usr/lib/python2.7/dist-packages/twistedcaldav/directory/aggregate.py",
line 192, in _query
    *[a[len(service.recordTypePrefix):] for a in args]
  File "/usr/lib/python2.7/dist-packages/twistedcaldav/directory/ldapdirectory.py",
line 320, in listRecords
    if self.restrictedGUIDs is not None:
  File "/usr/lib/python2.7/dist-packages/twistedcaldav/directory/ldapdirectory.py",
line 525, in restrictedGUIDs
    self._cachedRestrictedGUIDs =
set(self._expandGroupMembership(members, nestedGroups,
returnGroups=True))
UnboundLocalError: local variable 'nestedGroups' referenced before assignment


Turning off restrictEnabledRecords again like this lets me list my users again:
<key>restrictEnabledRecords</key>
<false/>


Any ideas? Looks like a bug to me.


More information about the calendarserver-users mailing list