[CalendarServer-changes] [3497] CalendarServer/trunk/twistedcaldav/directory/calendar.py
source_changes at macosforge.org
source_changes at macosforge.org
Wed Dec 10 09:14:56 PST 2008
Revision: 3497
http://trac.macosforge.org/projects/calendarserver/changeset/3497
Author: cdaboo at apple.com
Date: 2008-12-10 09:14:55 -0800 (Wed, 10 Dec 2008)
Log Message:
-----------
Always get maximum quota from config - bypass the dead property.
Modified Paths:
--------------
CalendarServer/trunk/twistedcaldav/directory/calendar.py
Modified: CalendarServer/trunk/twistedcaldav/directory/calendar.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/directory/calendar.py 2008-12-10 05:28:06 UTC (rev 3496)
+++ CalendarServer/trunk/twistedcaldav/directory/calendar.py 2008-12-10 17:14:55 UTC (rev 3497)
@@ -32,7 +32,7 @@
from twisted.web2.dav import davxml
from twisted.web2.http import HTTPError
from twisted.web2.dav.util import joinURL
-from twisted.web2.dav.resource import TwistedACLInheritable, TwistedQuotaRootProperty
+from twisted.web2.dav.resource import TwistedACLInheritable
from twistedcaldav import caldavxml
from twistedcaldav.config import config
@@ -436,16 +436,17 @@
def hasQuotaRoot(self, request):
"""
+ Always get quota root value from config.
+
@return: a C{True} if this resource has quota root, C{False} otherwise.
"""
- return self.hasDeadProperty(TwistedQuotaRootProperty) or config.UserQuota
+ return config.UserQuota != 0
def quotaRoot(self, request):
"""
+ Always get quota root value from config.
+
@return: a C{int} containing the maximum allowed bytes if this collection
is quota-controlled, or C{None} if not quota controlled.
"""
- if self.hasDeadProperty(TwistedQuotaRootProperty):
- return int(str(self.readDeadProperty(TwistedQuotaRootProperty)))
- else:
- return config.UserQuota
+ return config.UserQuota if config.UserQuota != 0 else None
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20081210/c601af2d/attachment.html>
More information about the calendarserver-changes
mailing list