[Zope3-checkins] SVN: Zope3/trunk/src/zope/security/ Cosmetic fixes.

Gintautas Miliauskas gintas at pov.lt
Tue Feb 22 06:24:58 EST 2005


Log message for revision 29243:
  Cosmetic fixes.
  

Changed:
  U   Zope3/trunk/src/zope/security/README.txt
  U   Zope3/trunk/src/zope/security/checker.py
  U   Zope3/trunk/src/zope/security/untrustedinterpreter.txt

-=-
Modified: Zope3/trunk/src/zope/security/README.txt
===================================================================
--- Zope3/trunk/src/zope/security/README.txt	2005-02-22 11:24:08 UTC (rev 29242)
+++ Zope3/trunk/src/zope/security/README.txt	2005-02-22 11:24:58 UTC (rev 29243)
@@ -162,8 +162,8 @@
     agents as the active principal in an interaction.
 
 
-Defining Permission Model
-~~~~~~~~~~~~~~~~~~~~~~~~~
+Defining a Permission Model
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 We define the following permissions::
 

Modified: Zope3/trunk/src/zope/security/checker.py
===================================================================
--- Zope3/trunk/src/zope/security/checker.py	2005-02-22 11:24:08 UTC (rev 29242)
+++ Zope3/trunk/src/zope/security/checker.py	2005-02-22 11:24:58 UTC (rev 29243)
@@ -86,7 +86,7 @@
 
 def canWrite(obj, name):
     """Check whether the interaction may write an attribute named name on obj.
-    
+
     Convenience method.  Rather than using checkPermission in high level code,
     use canWrite and canAccess to avoid binding code to permissions.
     """
@@ -96,17 +96,17 @@
         checker.check_setattr(obj, name)
     except Unauthorized:
         return False
-    # if it is Forbidden (or anything else), let it be raised: it probably 
+    # if it is Forbidden (or anything else), let it be raised: it probably
     # indicates a programming or configuration error
     return True
 
 def canAccess(obj, name):
     """Check whether the interaction may access an attribute named name on obj.
-    
+
     Convenience method.  Rather than using checkPermission in high level code,
     use canWrite and canAccess to avoid binding code to permissions.
     """
-    # access attributes and methods, including, in the current checker 
+    # access attributes and methods, including, in the current checker
     # implementation, special names like __getitem__
     obj = ProxyFactory(obj)
     checker = getChecker(obj)
@@ -114,7 +114,7 @@
         checker.check_getattr(obj, name)
     except Unauthorized:
         return False
-    # if it is Forbidden (or anything else), let it be raised: it probably 
+    # if it is Forbidden (or anything else), let it be raised: it probably
     # indicates a programming or configuration error
     return True
 
@@ -135,7 +135,6 @@
         set attribute access.
 
         """
-
         assert isinstance(get_permissions, dict)
         self.get_permissions = get_permissions
         if set_permissions is not None:

Modified: Zope3/trunk/src/zope/security/untrustedinterpreter.txt
===================================================================
--- Zope3/trunk/src/zope/security/untrustedinterpreter.txt	2005-02-22 11:24:08 UTC (rev 29242)
+++ Zope3/trunk/src/zope/security/untrustedinterpreter.txt	2005-02-22 11:24:58 UTC (rev 29243)
@@ -21,7 +21,7 @@
 functions are proxied, as described below, any access to objects
 outside the environment is mediated by the target security functions.
 
-Safe objects are objects who's operations, except for attribute
+Safe objects are objects whose operations, except for attribute
 retrieval, and methods access only information stored within the
 objects or passed as arguments.  Safe objects contained within the
 interpreter environment can contain only information that is already
@@ -47,7 +47,7 @@
 results in a non-basic object is also security proxied.
 
 All external resources needed to perform an operation are security
-proxied.  
+proxied.
 
 Let's consider the trusted interpreter for evaluating URLs.  In
 operation 1 of the example, the interpreter uses a proxied method for
@@ -177,9 +177,9 @@
 
 - Floating-point objects,
 
-- Date-time objects, 
+- Date-time objects,
 
-- Boolean objects (True and False), and 
+- Boolean objects (True and False), and
 
 - The special (nil) object, None.
 



More information about the Zope3-Checkins mailing list