Skip to content
This repository has been archived by the owner on Feb 13, 2020. It is now read-only.

Commit

Permalink
Allow calendar-disabled users in XML accounts.
Browse files Browse the repository at this point in the history
  • Loading branch information
cyrusdaboo committed Mar 17, 2008
1 parent 84f7fc1 commit 066b4bc
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions twistedcaldav/directory/xmlaccountsparser.py
Expand Up @@ -197,6 +197,7 @@ def repeat(self, ctr):
result.members = self.members
result.calendarUserAddresses = calendarUserAddresses
result.autoSchedule = self.autoSchedule
result.enabledForCalendaring = self.enabledForCalendaring
result.proxies = self.proxies
return result

Expand Down Expand Up @@ -228,9 +229,9 @@ def parseXML(self, node):
raise ValueError("<auto-schedule> element only allowed for Resources and Locations: %s" % (child_name,))
self.autoSchedule = True
elif child_name == ELEMENT_DISABLECALENDAR:
# Only Groups
if self.recordType not in (DirectoryService.recordType_groups):
raise ValueError("<disable-calendar> element only allowed for Groups: %s" % (child_name,))
# Only Users or Groups
if self.recordType not in (DirectoryService.recordType_users, DirectoryService.recordType_groups):
raise ValueError("<disable-calendar> element only allowed for Users or Groups: %s" % (child_name,))
self.enabledForCalendaring = False
elif child_name == ELEMENT_PROXIES:
# Only Resources & Locations
Expand Down

0 comments on commit 066b4bc

Please sign in to comment.