Modified: CalendarServer/trunk/calendarserver/tools/principals.py (4289 => 4290)
--- CalendarServer/trunk/calendarserver/tools/principals.py 2009-05-18 17:43:25 UTC (rev 4289)
+++ CalendarServer/trunk/calendarserver/tools/principals.py 2009-05-18 18:18:11 UTC (rev 4290)
@@ -420,11 +420,14 @@
@inlineCallbacks
def action_setAutoSchedule(principal, autoSchedule):
- print "Setting auto-schedule to %s for %s" % (
- { True: "true", False: "false" }[autoSchedule],
- principal,
- )
- (yield principal.setAutoSchedule(autoSchedule))
+ if autoSchedule and principal.record.recordType in ("users", "groups"):
+ print "Enabling auto-schedule for %s is not allowed." % (principal,)
+ else:
+ print "Setting auto-schedule to %s for %s" % (
+ { True: "true", False: "false" }[autoSchedule],
+ principal,
+ )
+ (yield principal.setAutoSchedule(autoSchedule))
@inlineCallbacks
def action_getAutoSchedule(principal):