[Zope-Checkins] CVS: Zope2 - User.py:1.147

Brian Lloyd brian@digicool.com
Tue, 17 Apr 2001 14:16:30 -0400 (EDT)


Update of /cvs-repository/Zope2/lib/python/AccessControl
In directory korak:/home/brian/temp/mainline_test/lib/python/AccessControl

Modified Files:
	User.py 
Log Message:
merged fix to _check_context to preserve existing behavior (dont fail 
context check if there is no user context for some reason)



--- Updated File User.py in package Zope2 --
--- User.py	2001/04/17 14:46:09	1.146
+++ User.py	2001/04/17 18:16:29	1.147
@@ -238,7 +238,8 @@
                     return 0
             if object.aq_inContextOf(context, 1):
                 return 1
-        return 0
+        # This is lame, but required to keep existing behavior.
+        return 1
 
     def allowed(self, object, object_roles=None):
         """Check whether the user has access to object. The user must