[CalendarServer-changes] [4290] CalendarServer/trunk/calendarserver/tools/principals.py
source_changes at macosforge.org
source_changes at macosforge.org
Mon May 18 11:18:17 PDT 2009
Revision: 4290
http://trac.macosforge.org/projects/calendarserver/changeset/4290
Author: wsanchez at apple.com
Date: 2009-05-18 11:18:11 -0700 (Mon, 18 May 2009)
Log Message:
-----------
Don't allow auto-schedule for users or groups
Modified Paths:
--------------
CalendarServer/trunk/calendarserver/tools/principals.py
Modified: CalendarServer/trunk/calendarserver/tools/principals.py
===================================================================
--- 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):
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20090518/51e566bc/attachment.html>
More information about the calendarserver-changes
mailing list