[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/Security - protectClass.py:1.1.2.1 metaConfigure.py:1.1.2.7

Jim Fulton jim@zope.com
Tue, 20 Nov 2001 14:14:46 -0500


Update of /cvs-repository/Zope3/lib/python/Zope/App/Security
In directory cvs.zope.org:/tmp/cvs-serv18937

Modified Files:
      Tag: Zope-3x-branch
	metaConfigure.py 
Added Files:
      Tag: Zope-3x-branch
	protectClass.py 
Log Message:
stubbed in protectClass and publicClass

=== Added File Zope3/lib/python/Zope/App/Security/protectClass.py ===
class protectClass:

    __complex=0

    def __init__(self, name, permission=None, interface=None,
                 method=None, methods=None):
        self.__name=name
        self.__permission=permission
        self.__interface=interface
        self.__method=method
        self.__methods=methods

    def protect(self, permission=None, interface=None,
                method=None, methods=None, instances=None):
        "Protect a specific aspect"
        # stub
        self.__complex=1

    def instances(self, permission=None):
        "Protect instances of the class, as opposed to methods"
        # stub
        self.__complex=1

    def __call__(self):
        "Handle empty case"


def publicClass(name, interface=None, method=None, methods=None):
    "Declare a class and some of it's methods to be public"


=== Zope3/lib/python/Zope/App/Security/metaConfigure.py 1.1.2.6 => 1.1.2.7 ===
 from Zope.Configuration import namespace
 from Zope.Configuration.meta import register
+from protectClass import protectClass, publicClass
 from PermissionRegistry import definePermission
 
 def metaConfigure():
     register(namespace('security'), 'definePermission', definePermission)
+    register(namespace('security'), 'protectClass', protectClass)
+    register(namespace('security'), 'publicClass', publicClass)