[Zope3-checkins] CVS: Zope3/src/zope/security - interfaces.py:1.6

Albertas Agejevas alga@codeworks.lt
Thu, 13 Mar 2003 11:28:45 -0500


Update of /cvs-repository/Zope3/src/zope/security
In directory cvs.zope.org:/tmp/cvs-serv11423/src/zope/security

Modified Files:
	interfaces.py 
Log Message:
Made SecurityManager.getPrincipal() return a Principal object wrapped
in a context of its AuthenticationService.


=== Zope3/src/zope/security/interfaces.py 1.5 => 1.6 ===
--- Zope3/src/zope/security/interfaces.py:1.5	Tue Feb 11 11:00:10 2003
+++ Zope3/src/zope/security/interfaces.py	Thu Mar 13 11:28:14 2003
@@ -42,7 +42,7 @@
 
 class ISecurityManagement(Interface):
     """Public security management API."""
-    
+
     def getSecurityManager():
         """Get a SecurityManager (create if needed)."""
 
@@ -80,6 +80,9 @@
         This is equivalent to something like::
         REQUEST['AUTHENTICATED_USER']
         but is a bit cleaner, especially if 'REQUEST' isn't handy.
+
+        An IPrincipal object wrapped in a context of its
+        AuthenticationService is returned.
         """
 
     def checkPermission(permission, object):
@@ -126,7 +129,7 @@
 
     Example (for __getitem__):
 
-           checker.check(ob, "__getitem__")
+           checker.check(ob, \"__getitem__\")
            return checker.proxy(ob[key])
     """
 
@@ -151,7 +154,7 @@
 
     def checkPermission(permission, object, context):
         """Return whether security context allows permission on object.
-        
+
         Arguments:
         permission -- A permission name
         object -- The object being accessed according to the permission
@@ -162,7 +165,7 @@
 
 class ISecurityContext(Interface):
     """Capture transient request-specific security information."""
-    
+
     Attribute('stack',
               'A stack of elements, each either be an ExecutableObject'
               'or a tuple consisting of an ExecutableObject and a'