[Zope-Checkins] CVS: Zope/lib/python/AccessControl - User.py:1.176.14.1
Brian Lloyd
brian@zope.com
Mon, 30 Jun 2003 09:40:04 -0400
Update of /cvs-repository/Zope/lib/python/AccessControl
In directory cvs.zope.org:/tmp/cvs-serv26773
Modified Files:
Tag: Zope-2_7-branch
User.py
Log Message:
fix for bug 959/514
=== Zope/lib/python/AccessControl/User.py 1.176 => 1.176.14.1 ===
--- Zope/lib/python/AccessControl/User.py:1.176 Tue Feb 11 12:17:03 2003
+++ Zope/lib/python/AccessControl/User.py Mon Jun 30 09:40:02 2003
@@ -263,7 +263,10 @@
def has_permission(self, permission, object):
"""Check to see if a user has a given permission on an object."""
- return getSecurityManager().checkPermission(permission, object)
+ roles=rolesForPermissionOn(permission, object)
+ if type(roles) is type(''):
+ roles=[roles]
+ return self.allowed(object, roles)
def __len__(self): return 1
def __str__(self): return self.getUserName()