[Zope3-checkins] CVS: Zope3/src/zope/app - context.py:1.5

Jim Fulton jim@zope.com
Mon, 2 Jun 2003 12:56:17 -0400


Update of /cvs-repository/Zope3/src/zope/app
In directory cvs.zope.org:/tmp/cvs-serv3969/src/zope/app

Modified Files:
	context.py 
Log Message:
Removed getRolese from IPrincipal and from carious other code.

Principals don't have integral roles.  In Zope 3, all grants,
including role grants are local.  In the future, we'll probably
provide a way for local grants to be found from an auth service to
allow some principal grants to be stored centrally.



=== Zope3/src/zope/app/context.py 1.4 => 1.5 ===
--- Zope3/src/zope/app/context.py:1.4	Mon Jun  2 10:49:36 2003
+++ Zope3/src/zope/app/context.py	Mon Jun  2 12:55:46 2003
@@ -75,6 +75,8 @@
 
     >>> [interface.__name__ for interface in list(providedBy(D2(D1(x))))]
     ['I4', 'I3', 'I1', 'I2']
+
+    $Id$
     """
 
     def __get__(self, inst, cls):
@@ -87,7 +89,7 @@
             # will return the proxied object's class.
             cls = type(inst) 
             return ObjectSpecification(provided, cls)
-
+        
 
 class Wrapper(BaseWrapper):
     """Zope-specific context wrapper
@@ -102,7 +104,7 @@
 
 
 def ContextWrapper(_ob, _parent, **kw):
-
+    
     if type(_ob) in BasicTypes:
         # Don't wrap basic objects
         return _ob
@@ -113,14 +115,14 @@
             # This would be a redundant wrapper. We'll just use the
             # one we've got.
 
-            # But we want to make sure we have the same data.
+            # But we want tp make sure we have the same data
             if kw:
                 dict = getdictcreate(wrapper)
                 dict.update(kw)
             return _ob
 
     if type(_ob) is Proxy:
-        # Insert into proxies.
+        # insert into proxies
         checker = getChecker(_ob)
         _ob = getProxiedObject(_ob)
         _ob = Proxy(Wrapper(_ob, _parent, **kw), checker)