[Zope-CVS] CVS: Products/Ape/lib/apelib/zope2 - security.py:1.5
Shane Hathaway
shane at zope.com
Tue Mar 16 23:02:19 EST 2004
Update of /cvs-repository/Products/Ape/lib/apelib/zope2
In directory cvs.zope.org:/tmp/cvs-serv19838/zope2
Modified Files:
security.py
Log Message:
Removed some assertions that can fail for no useful reason.
=== Products/Ape/lib/apelib/zope2/security.py 1.4 => 1.5 ===
--- Products/Ape/lib/apelib/zope2/security.py:1.4 Mon Feb 2 10:07:23 2004
+++ Products/Ape/lib/apelib/zope2/security.py Tue Mar 16 23:02:18 2004
@@ -146,7 +146,7 @@
if decl_type == 'executable-owner':
assert not role
assert not permission
- assert username
+ #assert username
pos = username.rfind('/')
if pos < 0:
# Default to the root folder
@@ -160,9 +160,9 @@
obj._owner = (ufolder, uname)
elif decl_type == 'local-role':
- assert role
+ #assert role
assert not permission
- assert username
+ #assert username
r = local_roles.get(username)
if r is None:
r = []
@@ -170,20 +170,20 @@
r.append(role)
elif decl_type == 'define-role':
- assert role
+ #assert role
assert not permission
assert not username
defined_roles.append(role)
elif decl_type == 'proxy-role':
- assert role
+ #assert role
assert not permission
assert not username
proxy_roles.append(role)
elif decl_type == 'permission-role':
- assert role
- assert permission
+ #assert role
+ #assert permission
assert not username
r = permission_roles.get(permission)
if r is None:
@@ -195,7 +195,7 @@
elif decl_type == 'permission-no-acquire':
assert not role
- assert permission
+ #assert permission
assert not username
permission_acquired[permission] = 0
More information about the Zope-CVS
mailing list