[Zope-Checkins] CVS: Zope/lib/python/AccessControl -
PermissionMapping.py:1.13.70.1 Role.py:1.56.14.1 User.py:1.176.14.5
Tres Seaver
cvs-admin at zope.org
Mon Nov 17 17:34:33 EST 2003
Update of /cvs-repository/Zope/lib/python/AccessControl
In directory cvs.zope.org:/tmp/cvs-serv16574/lib/python/AccessControl
Modified Files:
Tag: Zope-2_7-branch
PermissionMapping.py Role.py User.py
Log Message:
- Merge tseaver-strexp_delenda-branch to the 2.7 branch.
=== Zope/lib/python/AccessControl/PermissionMapping.py 1.13 => 1.13.70.1 ===
--- Zope/lib/python/AccessControl/PermissionMapping.py:1.13 Wed Aug 14 17:29:07 2002
+++ Zope/lib/python/AccessControl/PermissionMapping.py Mon Nov 17 17:34:01 2003
@@ -62,7 +62,7 @@
p=class_permissions[i]
if p and (p not in perms):
__traceback_info__=perms, p, i
- raise 'Permission mapping error', (
+ raise ValueError, (
"""Attempted to map a permission to a permission, %s,
that is not valid. This should never happen. (Waaa).
""" % escape(p))
=== Zope/lib/python/AccessControl/Role.py 1.56 => 1.56.14.1 ===
--- Zope/lib/python/AccessControl/Role.py:1.56 Sat Jan 18 21:07:33 2003
+++ Zope/lib/python/AccessControl/Role.py Mon Nov 17 17:34:01 2003
@@ -171,7 +171,7 @@
if REQUEST is not None: return self.manage_access(REQUEST)
return
- raise 'Invalid Permission', (
+ raise ValueError, (
"The permission <em>%s</em> is invalid." %
escape(permission_to_manage))
@@ -245,7 +245,7 @@
},
valid_roles)
- raise 'Invalid Permission', (
+ raise ValueError, (
"The permission <em>%s</em> is invalid." % escape(permission))
def acquiredRolesAreUsedBy(self, permission):
@@ -257,7 +257,7 @@
roles=p.getRoles()
return type(roles) is ListType and 'CHECKED' or ''
- raise 'Invalid Permission', (
+ raise ValueError, (
"The permission <em>%s</em> is invalid." % escape(permission))
=== Zope/lib/python/AccessControl/User.py 1.176.14.4 => 1.176.14.5 ===
--- Zope/lib/python/AccessControl/User.py:1.176.14.4 Fri Nov 14 17:57:26 2003
+++ Zope/lib/python/AccessControl/User.py Mon Nov 17 17:34:01 2003
@@ -26,7 +26,7 @@
from PermissionRole import _what_not_even_god_should_do, rolesForPermissionOn
import AuthEncoding
from AccessControl import getSecurityManager
-from zExceptions import Unauthorized
+from zExceptions import Unauthorized, BadRequest
from AccessControl.SecurityManagement import newSecurityManager
from AccessControl.SecurityManagement import noSecurityManager
from AccessControl.ZopeSecurityPolicy import _noroles
@@ -568,7 +568,7 @@
try: name, password=tuple(decodestring(
auth.split(' ')[-1]).split(':', 1))
except:
- raise 'Bad Request', 'Invalid authentication token'
+ raise BadRequest, 'Invalid authentication token'
return name, password
else:
return None, None
More information about the Zope-Checkins
mailing list