[Zope3-checkins] CVS: Zope3/src/zope/app/security - __init__.py:1.4
permission.py:1.10
Stephan Richter
srichter at cosmos.phy.tufts.edu
Tue Feb 24 09:12:13 EST 2004
Update of /cvs-repository/Zope3/src/zope/app/security
In directory cvs.zope.org:/tmp/cvs-serv30570/app/security
Modified Files:
__init__.py permission.py
Log Message:
improved doc strings
=== Zope3/src/zope/app/security/__init__.py 1.3 => 1.4 ===
--- Zope3/src/zope/app/security/__init__.py:1.3 Wed Dec 25 14:28:51 2002
+++ Zope3/src/zope/app/security/__init__.py Tue Feb 24 09:12:11 2004
@@ -11,7 +11,10 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
+"""Zope Application-specific Security code
+$Id$
+"""
# Register some standard types
import _protections
_protections.protect()
=== Zope3/src/zope/app/security/permission.py 1.9 => 1.10 ===
--- Zope3/src/zope/app/security/permission.py:1.9 Mon Jan 5 03:06:12 2004
+++ Zope3/src/zope/app/security/permission.py Tue Feb 24 09:12:11 2004
@@ -15,7 +15,6 @@
$Id$
"""
-
from zope.schema import Enumerated, Field
from zope.schema.interfaces import ValidationError
from zope.component import getService
@@ -26,12 +25,13 @@
def checkPermission(context, permission_id):
-
+ """Check whether a given permission exists in the provided context."""
if not getService(context, Permissions).getPermission(permission_id):
raise ValueError("Undefined permission id", permission_id)
+
class PermissionField(Enumerated, Field):
- __doc__ = IPermissionField.__doc__
+ """A field that represents a permission in a schema"""
implements(IPermissionField)
def _validate(self, value):
More information about the Zope3-Checkins
mailing list