[Zope-Checkins] CVS: Zope/lib/python/AccessControl -
PermissionMapping.py:1.14 Role.py:1.58 User.py:1.181
Tres Seaver
cvs-admin at zope.org
Tue Nov 18 08:17:28 EST 2003
Update of /cvs-repository/Zope/lib/python/AccessControl
In directory cvs.zope.org:/tmp/cvs-serv30559/lib/python/AccessControl
Modified Files:
PermissionMapping.py Role.py User.py
Log Message:
- Merge tseaver-strexp_delenda-branch to the head.
=== Zope/lib/python/AccessControl/PermissionMapping.py 1.13 => 1.14 ===
--- Zope/lib/python/AccessControl/PermissionMapping.py:1.13 Wed Aug 14 17:29:07 2002
+++ Zope/lib/python/AccessControl/PermissionMapping.py Tue Nov 18 08:16:57 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.57 => 1.58 ===
--- Zope/lib/python/AccessControl/Role.py:1.57 Sun Aug 17 13:51:32 2003
+++ Zope/lib/python/AccessControl/Role.py Tue Nov 18 08:16:57 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.180 => 1.181 ===
--- Zope/lib/python/AccessControl/User.py:1.180 Fri Nov 14 17:58:58 2003
+++ Zope/lib/python/AccessControl/User.py Tue Nov 18 08:16:57 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