[Zope-CVS] CVS: Packages/Moztop/moztopsupport/dav - lock.py:1.1 unlock.py:1.1 configure.zcml:1.8

Sidnei da Silva sidnei@x3ng.com.br
Sat, 29 Mar 2003 14:39:17 -0500


Update of /cvs-repository/Packages/Moztop/moztopsupport/dav
In directory cvs.zope.org:/tmp/cvs-serv13307/dav

Modified Files:
	configure.zcml 
Added Files:
	lock.py unlock.py 
Log Message:
placeholders for lock and unlock

=== Added File Packages/Moztop/moztopsupport/dav/lock.py ===
##############################################################################
# Copyright (c) 2003 Zope Corporation and Contributors.
# All Rights Reserved.
# 
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
##############################################################################
"""DAV method LOCK

$Id: lock.py,v 1.1 2003/03/29 19:39:17 sidnei Exp $
"""
__metaclass__ = type

from zope.app.interfaces.file import IWriteDirectory
from zope.app.interfaces.file import IDirectoryFactory
from zope.app.interfaces.container import IZopeWriteContainer
from zope.app.event import publish
from zope.app.event.objectevent import ObjectCreatedEvent
from zope.component import queryAdapter, getAdapter

class LOCK:
    """LOCK handler
    """

    def __init__(self, context, request):
        self.context = context
        self.request = request

    def LOCK(self):
        request = self.request
        destination = request.getHeader('destination', '')
        request.response.setStatus(403)
        return ''


=== Added File Packages/Moztop/moztopsupport/dav/unlock.py ===
##############################################################################
# Copyright (c) 2003 Zope Corporation and Contributors.
# All Rights Reserved.
# 
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
##############################################################################
"""DAV method UNLOCK

$Id: unlock.py,v 1.1 2003/03/29 19:39:17 sidnei Exp $
"""
__metaclass__ = type

from zope.app.interfaces.file import IWriteDirectory
from zope.app.interfaces.file import IDirectoryFactory
from zope.app.interfaces.container import IZopeWriteContainer
from zope.app.event import publish
from zope.app.event.objectevent import ObjectCreatedEvent
from zope.component import queryAdapter, getAdapter

class UNLOCK:
    """UNLOCK handler
    """

    def __init__(self, context, request):
        self.context = context
        self.request = request

    def UNLOCK(self):
        request = self.request
        destination = request.getHeader('destination', '')
        request.response.setStatus(403)
        return ''


=== Packages/Moztop/moztopsupport/dav/configure.zcml 1.7 => 1.8 ===
--- Packages/Moztop/moztopsupport/dav/configure.zcml:1.7	Sat Mar 29 12:09:54 2003
+++ Packages/Moztop/moztopsupport/dav/configure.zcml	Sat Mar 29 14:39:17 2003
@@ -40,6 +40,22 @@
 	allowed_attributes="COPY"
   />
 
+  <view for="*"
+ 	name="LOCK"
+	type="zope.publisher.interfaces.http.IHTTPPresentation"
+	factory=".lock.LOCK"
+	permission="zope.ManageContent"
+	allowed_attributes="LOCK"
+  />
+
+  <view for="*"
+ 	name="UNLOCK"
+	type="zope.publisher.interfaces.http.IHTTPPresentation"
+	factory=".unlock.UNLOCK"
+	permission="zope.ManageContent"
+	allowed_attributes="UNLOCK"
+  />
+
   <view
     for="zope.app.interfaces.content.zpt.IZPTPage"
     type="zope.publisher.interfaces.http.IHTTPPresentation"