[CalendarServer-changes] [13927] CalendarServer/trunk/calendarserver/tools/principals.py
source_changes at macosforge.org
source_changes at macosforge.org
Tue Sep 2 09:22:09 PDT 2014
Revision: 13927
http://trac.calendarserver.org//changeset/13927
Author: sagen at apple.com
Date: 2014-09-02 09:22:09 -0700 (Tue, 02 Sep 2014)
Log Message:
-----------
Don't allow manipulating proxies for locations and resources when UseDirectoryBasedDelegates is set to True
Modified Paths:
--------------
CalendarServer/trunk/calendarserver/tools/principals.py
Modified: CalendarServer/trunk/calendarserver/tools/principals.py
===================================================================
--- CalendarServer/trunk/calendarserver/tools/principals.py 2014-08-29 23:52:53 UTC (rev 13926)
+++ CalendarServer/trunk/calendarserver/tools/principals.py 2014-09-02 16:22:09 UTC (rev 13927)
@@ -564,12 +564,28 @@
@inlineCallbacks
def action_addProxy(store, record, proxyType, *proxyIDs):
+ if config.GroupCaching.Enabled and config.GroupCaching.UseDirectoryBasedDelegates:
+ if record.recordType in (
+ record.service.recordType.location,
+ record.service.recordType.resource,
+ ):
+ print("You are not allowed to add proxies for locations or resources via command line when their proxy assignments come from the directory service.")
+ returnValue(None)
+
yield _addRemoveProxy("Added", addDelegate, store, record, proxyType, *proxyIDs)
@inlineCallbacks
def action_removeProxy(store, record, *proxyIDs):
+ if config.GroupCaching.Enabled and config.GroupCaching.UseDirectoryBasedDelegates:
+ if record.recordType in (
+ record.service.recordType.location,
+ record.service.recordType.resource,
+ ):
+ print("You are not allowed to remove proxies for locations or resources via command line when their proxy assignments come from the directory service.")
+ returnValue(None)
+
# Write
yield _addRemoveProxy("Removed", removeDelegate, store, record, "write", *proxyIDs)
# Read
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20140902/1d52b395/attachment.html>
More information about the calendarserver-changes
mailing list