diff options
author | Jason Madden <jamadden@gmail.com> | 2017-09-15 08:01:53 -0500 |
---|---|---|
committer | Jason Madden <jamadden@gmail.com> | 2017-09-15 08:01:53 -0500 |
commit | e68d13a28b347ff95b12960ac882c59b504902ed (patch) | |
tree | fb5d2ece61f9c8a738e59d31042dd082cb1e8916 | |
parent | 502c31eea599977b20c43d8659db09f71ed0cff2 (diff) | |
download | zope-security-e68d13a28b347ff95b12960ac882c59b504902ed.tar.gz |
Consistent capitalization of ID in docstrings and fields (except one case where it was a i18n messageid).
TIL that sphinx.ext.doctest has IGNORE_EXCEPTION_DETAIL set by default.
-rw-r--r-- | docs/api/permission.rst | 2 | ||||
-rw-r--r-- | src/zope/security/adapter.py | 2 | ||||
-rw-r--r-- | src/zope/security/checker.py | 6 | ||||
-rw-r--r-- | src/zope/security/interfaces.py | 2 | ||||
-rw-r--r-- | src/zope/security/metadirectives.py | 2 | ||||
-rw-r--r-- | src/zope/security/permission.py | 4 | ||||
-rw-r--r-- | src/zope/security/testing.py | 4 | ||||
-rw-r--r-- | src/zope/security/zcml.py | 8 |
8 files changed, 15 insertions, 15 deletions
diff --git a/docs/api/permission.rst b/docs/api/permission.rst index dacb0ac..107e495 100644 --- a/docs/api/permission.rst +++ b/docs/api/permission.rst @@ -29,7 +29,7 @@ >>> checkPermission(None, 'y') Traceback (most recent call last): ... - ValueError: ('Undefined permission id', 'y') + ValueError: ('Undefined permission ID', 'y') The :data:`zope.security.checker.CheckerPublic` permission always exists: diff --git a/src/zope/security/adapter.py b/src/zope/security/adapter.py index e6da570..661e49d 100644 --- a/src/zope/security/adapter.py +++ b/src/zope/security/adapter.py @@ -113,7 +113,7 @@ class LocatingUntrustedAdapterFactory(object): other than :const:`zope.Public <zope.security.interfaces.PUBLIC_PERMISSION_NAME>` is required, untrusted adapters need a location in order that the local - authentication mechanism can be inovked correctly. + authentication mechanism can be invoked correctly. If the adapter does not provide :class:`zope.location.interfaces.ILocation`, we location proxy it diff --git a/src/zope/security/checker.py b/src/zope/security/checker.py index 5b74242..79975d4 100644 --- a/src/zope/security/checker.py +++ b/src/zope/security/checker.py @@ -201,7 +201,7 @@ class CheckerPy(object): A dictionary must be provided for computing permissions for names. The dictionary get will be called with attribute names - and must return a permission id, None, or the special marker, + and must return a permission ID, None, or the special marker, :const:`CheckerPublic`. If None is returned, then access to the name is forbidden. If :const:`CheckerPublic` is returned, then access will be granted without checking a permission. @@ -357,7 +357,7 @@ def NamesChecker(names=(), permission_id=CheckerPublic, **__kw__): A sequence of names is given as the first argument. If a second argument, permission_id, is given, it is the permission required - to access the names. Additional names and permission ids can be + to access the names. Additional names and permission IDs can be supplied as keyword arguments. """ @@ -387,7 +387,7 @@ def MultiChecker(specs): o a sequence of names or an interface - o a permission id + o a permission ID All the names in the sequence of names or the interface are protected by the permission. diff --git a/src/zope/security/interfaces.py b/src/zope/security/interfaces.py index 6b50a9f..4c62bdc 100644 --- a/src/zope/security/interfaces.py +++ b/src/zope/security/interfaces.py @@ -433,7 +433,7 @@ class IMemberAwareGroup(IMemberGetterGroup): def setMembers(value): """ - Set members of group to the principal ids in the iterable + Set members of group to the principal IDs in the iterable *value*. """ diff --git a/src/zope/security/metadirectives.py b/src/zope/security/metadirectives.py index bd1f793..c0830d6 100644 --- a/src/zope/security/metadirectives.py +++ b/src/zope/security/metadirectives.py @@ -192,4 +192,4 @@ class IRequire(Interface): permission = Permission( title=u"Permission ID", - description=u"The id of the permission to require.") + description=u"The ID of the permission to require.") diff --git a/src/zope/security/permission.py b/src/zope/security/permission.py index e3e8a60..b54d285 100644 --- a/src/zope/security/permission.py +++ b/src/zope/security/permission.py @@ -48,11 +48,11 @@ def checkPermission(context, permission_id): if permission_id is CheckerPublic: return if not queryUtility(IPermission, permission_id, context=context): - raise ValueError("Undefined permission id", permission_id) + raise ValueError("Undefined permission ID", permission_id) def allPermissions(context=None): """ - Get the ids of all defined permission object utilities. + Get the IDs of all defined permission object utilities. """ for name, _permission in getUtilitiesFor(IPermission, context): if name != zope_Public: diff --git a/src/zope/security/testing.py b/src/zope/security/testing.py index b6fb8f2..bd4b889 100644 --- a/src/zope/security/testing.py +++ b/src/zope/security/testing.py @@ -84,7 +84,7 @@ def addCheckerPublic(): def create_interaction(principal_id, **kw): """ - Create a new interaction for the given principal id, make it the + Create a new interaction for the given principal ID, make it the :func:`current interaction <zope.security.management.newInteraction>`, and return the :class:`Principal` object. @@ -99,7 +99,7 @@ def create_interaction(principal_id, **kw): def interaction(principal_id, **kw): """ A context manager for running an interaction for the given - principal id. + principal ID. """ if zope.security.management.queryInteraction(): # There already is an interaction. Great. Leave it alone. diff --git a/src/zope/security/zcml.py b/src/zope/security/zcml.py index 777a4fd..78ef5cc 100644 --- a/src/zope/security/zcml.py +++ b/src/zope/security/zcml.py @@ -75,8 +75,8 @@ class IPermissionDirective(Interface): """Define a new security object.""" id = Id( - title=u"Id", - description=u"Id as which this object will be known and used.", + title=u"ID", + description=u"ID as which this object will be known and used.", required=True) title = MessageID( @@ -101,12 +101,12 @@ class IRedefinePermission(Interface): from_ = Permission( title=u"Original permission", - description=u"Original permission id to redefine.", + description=u"Original permission ID to redefine.", required=True) to = Permission( title=u"Substituted permission", - description=u"Substituted permission id.", + description=u"Substituted permission ID.", required=True) def redefinePermission(_context, from_, to): |