diff options
author | Jason Madden <jamadden@gmail.com> | 2017-09-13 09:30:31 -0500 |
---|---|---|
committer | Jason Madden <jamadden@gmail.com> | 2017-09-13 09:30:31 -0500 |
commit | 756ac89f2c80012954b306d20ac8916bdcb95e09 (patch) | |
tree | 63e863a99a0b438a4180de2e7ae8962a8de74210 /src/zope/security/interfaces.py | |
parent | dde46cb714f32d40f3cc1ed70bf5653dcc6a7654 (diff) | |
download | zope-security-756ac89f2c80012954b306d20ac8916bdcb95e09.tar.gz |
Promote the constant for zope.Public from metaconfigure.py to interfaces.pypublic_permission_const
And use it consistently throughout this package.
On Python 2, sometimes we were comparing the string with unicode and
sometimes with str. Now its consistent.
This is a start to addressing #6
Diffstat (limited to 'src/zope/security/interfaces.py')
-rw-r--r-- | src/zope/security/interfaces.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/zope/security/interfaces.py b/src/zope/security/interfaces.py index 1035b77..81addc2 100644 --- a/src/zope/security/interfaces.py +++ b/src/zope/security/interfaces.py @@ -19,6 +19,12 @@ from zope.interface.common.interfaces import IException, IAttributeError from zope.schema import Text, TextLine from zope.security.i18n import ZopeMessageFactory as _ +#: The name (id) of the registered :class:`IPermission` utility that signifies +#: that the protected attribute is public. +#: +#: .. versionadded:: 4.2.0 +PUBLIC_PERMISSION_NAME = 'zope.Public' + class IUnauthorized(IException): pass @@ -26,8 +32,6 @@ class IUnauthorized(IException): class Unauthorized(Exception): """Some user wasn't allowed to access a resource""" - - class IForbidden(IException): pass |