[Checkins] SVN: z3c.securitytool/trunk/src/z3c/securitytool/ Updated permdetails.pt to appropriately describe each section

Daniel Blackburn blackburnd at gmail.com
Thu Feb 21 19:54:33 EST 2008


Log message for revision 84124:
  Updated permdetails.pt to appropriately describe each section

Changed:
  U   z3c.securitytool/trunk/src/z3c/securitytool/browser/permdetails.pt
  U   z3c.securitytool/trunk/src/z3c/securitytool/securitytool.py

-=-
Modified: z3c.securitytool/trunk/src/z3c/securitytool/browser/permdetails.pt
===================================================================
--- z3c.securitytool/trunk/src/z3c/securitytool/browser/permdetails.pt	2008-02-22 00:40:56 UTC (rev 84123)
+++ z3c.securitytool/trunk/src/z3c/securitytool/browser/permdetails.pt	2008-02-22 00:54:32 UTC (rev 84124)
@@ -7,7 +7,7 @@
        <h1>Security Checking Tool</h1>
        <div class="top_nav">
          <a class="top_nav_val"  href="./securityMatrix.html">Security Matrix</a>&nbsp|&nbsp
-         <span class="top_nav_val">Principal Settings </span>
+         <span class="top_nav_val">Permission Settings </span>
        </div>
        <p class="description"> The permission settings for the
        intersection of the view and principal are displayed here. This
@@ -33,8 +33,7 @@
                   <div class="context">
                       <h3 tal:condition="permissions"
                       tal:define="junk python:permissions.sort()">
-                      Permission for this view and principal 
-                      in effect at this context </h3>
+                      Permissions for this view and principal </h3>
                       <p class="sectionInfo"  tal:condition="permissions"> This section lists 
                        the permission setting applied to this user and <br>
                        view calculated from  all contexts in the current
@@ -51,12 +50,11 @@
                          </div>
                       </div>
                       <br tal:condition="permissions">
-                      <h3 tal:condition="roles">Permissions provided by roles</h3>
-                      <p class="sectionInfo"  tal:condition="roles"> This section lists all
-                      the roles assigned to this user and the <br> 
-                      permissions they provide at all contexts in the current <br>
-                      traversal path. These are the actual roles with their <br>
-                      permissions this user has assigned.
+                      <h3 tal:condition="roles">Permissions provided
+                                     by roles</h3>
+                      <p class="sectionInfo"  tal:condition="roles"> This section lists the
+                      the roles and the permissions they provide<br>
+                      which may provide access the view.
                       </p>
                       <br>
                       <div tal:condition="roles">
@@ -80,8 +78,8 @@
                       <h3 tal:condition="permissionTree">Permissions Defined in
                       Context(s) for this user</h3>
                       <p class="sectionInfo"  tal:condition="permissionTree"> This section lists all
-                      the permissions assigned to this <br>user and the
-                      context level assigned. The same settings <br>
+                      the related permissions for this <br>user and view
+                      and the context level assigned. The same settings <br>
                       can be found in the @@grant.html view on each context.
                       </p>
                       <br>
@@ -103,9 +101,9 @@
                       <h3 tal:condition="roleTree">Roles Defined in
                       Context(s) for this user</h3>
                       <p class="sectionInfo"  tal:condition="permissionTree"> This section lists all
-                      the roles assigned to this user and <br>the
-                      context level assigned. The same settings 
-                      can be <br>found in the @@grant.html view on each context.
+                      the roles and permissions assigned to this user and <br>the
+                      context level assigned which may provide access
+                      to the view.<br>The same settings can be found in the @@grant.html view on each context.
                       </p>
                       <br>
 

Modified: z3c.securitytool/trunk/src/z3c/securitytool/securitytool.py
===================================================================
--- z3c.securitytool/trunk/src/z3c/securitytool/securitytool.py	2008-02-22 00:40:56 UTC (rev 84123)
+++ z3c.securitytool/trunk/src/z3c/securitytool/securitytool.py	2008-02-22 00:54:32 UTC (rev 84124)
@@ -197,19 +197,6 @@
             # Attempting to pop empty list
             pass
 
-    def updatePrincipalMatrix(self, settings):
-        """ this method recursively populates the principal permissions
-            dict and is only used by principalPermissions """
-
-        for setting in settings:
-            for name, item in setting.items():
-                self.updateMatrixRoles(name,item)
-                self.updateMatrixPermissions(item)
-            for group_id in self.principal.groups:
-                group = self.principals.getPrincipal(group_id)
-                self.principalMatrix['groups'][group_id] = \
-                    self(group)
-
     def updateRoleTree(self,item,parentList,curRole):
         """
         This method is responsible for poplating the roletree.
@@ -288,6 +275,7 @@
         self.principal_id = principal_id
         self.skin = skin
         self.read_perm = 'zope.Public'
+        self.view_name = view_name
 
         request = TestRequest()
         applySkin(request, skin)
@@ -386,6 +374,23 @@
 
             self.principalMatrix['permissions'].append(mapping)
 
+
+    def updatePrincipalMatrix(self, settings):
+        """ this method recursively populates the principal permissions
+            dict and is only used by principalPermissions """
+
+        for setting in settings:
+            for name, item in setting.items():
+                self.updateMatrixRoles(name,item)
+                self.updateMatrixPermissions(item)
+
+            for group_id in self.principal.groups:
+                group = self.principals.getPrincipal(group_id)
+                self.principalMatrix['groups'][group_id] = \
+                    self(group, self.view_name)
+
+
+
 class PrincipalDetails(MatrixDetails):
     implements(interfaces.IPrincipalDetails)
     adapts(Interface)
@@ -471,7 +476,21 @@
 
             self.principalMatrix['permissions'].append(mapping)
 
+    def updatePrincipalMatrix(self, settings):
+        """ this method recursively populates the principal permissions
+            dict and is only used by principalPermissions """
 
+        for setting in settings:
+            for name, item in setting.items():
+                self.updateMatrixRoles(name,item)
+                self.updateMatrixPermissions(item)
+
+            for group_id in self.principal.groups:
+                group = self.principals.getPrincipal(group_id)
+                self.principalMatrix['groups'][group_id] = \
+                    self(group)
+
+
 def getViews(iface, reqType=IRequest):
     """Get all view registrations for a particular interface."""
     gsm = getGlobalSiteManager()



More information about the Checkins mailing list