[CalendarServer-changes] [6043] CalendarServer/branches/users/glyph/sql-store/txcaldav/calendarstore /postgres.py
source_changes at macosforge.org
source_changes at macosforge.org
Tue Aug 10 20:30:39 PDT 2010
Revision: 6043
http://trac.macosforge.org/projects/calendarserver/changeset/6043
Author: glyph at apple.com
Date: 2010-08-10 20:30:38 -0700 (Tue, 10 Aug 2010)
Log Message:
-----------
test_sharing passes
Modified Paths:
--------------
CalendarServer/branches/users/glyph/sql-store/txcaldav/calendarstore/postgres.py
Modified: CalendarServer/branches/users/glyph/sql-store/txcaldav/calendarstore/postgres.py
===================================================================
--- CalendarServer/branches/users/glyph/sql-store/txcaldav/calendarstore/postgres.py 2010-08-11 02:43:01 UTC (rev 6042)
+++ CalendarServer/branches/users/glyph/sql-store/txcaldav/calendarstore/postgres.py 2010-08-11 03:30:38 UTC (rev 6043)
@@ -14,8 +14,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
##
-from txdav.common.inotifications import INotificationCollection, \
- INotificationObject
"""
PostgreSQL data store.
@@ -46,6 +44,8 @@
from twext.web2.dav.element.rfc2518 import ResourceType
from txdav.idav import IDataStore, AlreadyFinishedError
+from txdav.common.inotifications import (INotificationCollection,
+ INotificationObject)
from txdav.common.icommondatastore import (
ObjectResourceNameAlreadyExistsError, HomeChildNameAlreadyExistsError,
@@ -64,7 +64,6 @@
from twext.web2.http_headers import MimeType
from twext.web2.dav.element.parser import WebDAVDocument
-
from twext.python.vcomponent import VComponent
from twistedcaldav.vcard import Component as VCard
from twistedcaldav.sharing import Invite
@@ -529,7 +528,9 @@
def recordForUserID(self, userid):
- raise NotImplementedError("recordForUserID")
+ for record in self.allRecords():
+ if record.userid == userid:
+ return record
def recordForPrincipalURL(self, principalURL):
@@ -615,7 +616,11 @@
def removeRecordForUserID(self, userid):
- raise NotImplementedError("removeRecordForUserID")
+ rec = self.recordForUserID(userid)
+ self._txn.execSQL(
+ "delete from INVITE where INVITE_UID = %s",
+ [rec.inviteuid]
+ )
def removeRecordForPrincipalURL(self, principalURL):
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20100810/5b9656d7/attachment-0001.html>
More information about the calendarserver-changes
mailing list