[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/Security - PermissionRegistry.py:1.1.2.16.14.1

Steve Alexander steve@cat-box.net
Fri, 31 May 2002 19:31:53 -0400


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

Modified Files:
      Tag: Zope3InWonderland-branch
	PermissionRegistry.py 
Log Message:
Permission ids must not start with a dot.


=== Zope3/lib/python/Zope/App/Security/PermissionRegistry.py 1.1.2.16 => 1.1.2.16.14.1 ===
         """Define a new permission object, register, and return it.
 
-        name is the permission name, must be globally unique
+        permission is the permission name, must be globally unique
 
         title is the permission title, human readable.
 
         description (optional) is human readable
         """
+        if permission.startswith('.'):
+            raise ValueError("permissions must not start with a '.'")
         return self.register(permission, title, description)
 
     def definedPermission(self, permission_id):