[CalendarServer-changes] [9483] CalendarServer/branches/users/gaya/inviteclean/twistedcaldav/ storebridge.py
source_changes at macosforge.org
source_changes at macosforge.org
Mon Jul 23 15:42:27 PDT 2012
Revision: 9483
http://trac.macosforge.org/projects/calendarserver/changeset/9483
Author: gaya at apple.com
Date: 2012-07-23 15:42:26 -0700 (Mon, 23 Jul 2012)
Log Message:
-----------
clean up CalendarObjectDropbox.sharedDropboxACEs()
Modified Paths:
--------------
CalendarServer/branches/users/gaya/inviteclean/twistedcaldav/storebridge.py
Modified: CalendarServer/branches/users/gaya/inviteclean/twistedcaldav/storebridge.py
===================================================================
--- CalendarServer/branches/users/gaya/inviteclean/twistedcaldav/storebridge.py 2012-07-23 22:39:02 UTC (rev 9482)
+++ CalendarServer/branches/users/gaya/inviteclean/twistedcaldav/storebridge.py 2012-07-23 22:42:26 UTC (rev 9483)
@@ -59,6 +59,7 @@
from txdav.base.propertystore.base import PropertyName
from txdav.caldav.icalendarstore import QuotaExceeded
from txdav.common.icommondatastore import NoSuchObjectResourceError
+from txdav.common.datastore.sql_tables import _BIND_MODE_READ, _BIND_MODE_WRITE
from txdav.idav import PropertyChangeNotAllowedError
import time
@@ -1509,31 +1510,20 @@
@inlineCallbacks
def sharedDropboxACEs(self):
-
- #TODO: verify that this this works!
- from txdav.common.datastore.sql_tables import _BIND_MODE_OWN, _BIND_MODE_READ, _BIND_MODE_WRITE
-
aces = ()
calendars = yield self._newStoreCalendarObject._parentCollection.asShared()
for calendar in calendars:
- # Invite shares use access mode from the invite
- #if record.state != "ACCEPTED":
- # continue
-
-
+
userprivs = [
]
- #if record.access in ("read-only", "read-write", "read-write-schedule",):
- if calendar.shareMode() in (_BIND_MODE_READ, _BIND_MODE_WRITE, _BIND_MODE_OWN,):
+ if calendar.shareMode() in (_BIND_MODE_READ, _BIND_MODE_WRITE,):
userprivs.append(davxml.Privilege(davxml.Read()))
userprivs.append(davxml.Privilege(davxml.ReadACL()))
userprivs.append(davxml.Privilege(davxml.ReadCurrentUserPrivilegeSet()))
- #if record.access in ("read-only",):
if calendar.shareMode() in (_BIND_MODE_READ,):
userprivs.append(davxml.Privilege(davxml.WriteProperties()))
- #if record.access in ("read-write", "read-write-schedule",):
- if calendar.shareMode() in (_BIND_MODE_WRITE, _BIND_MODE_OWN,):
+ if calendar.shareMode() in (_BIND_MODE_WRITE,):
userprivs.append(davxml.Privilege(davxml.Write()))
proxyprivs = list(userprivs)
proxyprivs.remove(davxml.Privilege(davxml.ReadACL()))
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20120723/d4757a95/attachment.html>
More information about the calendarserver-changes
mailing list