[Checkins] SVN: z3c.securitytool/trunk/ Added some more smoke tests
for the views
Daniel Blackburn
blackburnd at gmail.com
Mon Jan 28 21:17:54 EST 2008
Log message for revision 83286:
Added some more smoke tests for the views
Changed:
U z3c.securitytool/trunk/CHANGES.txt
U z3c.securitytool/trunk/README.txt
U z3c.securitytool/trunk/TODO.txt
U z3c.securitytool/trunk/src/z3c/securitytool/README.txt
-=-
Modified: z3c.securitytool/trunk/CHANGES.txt
===================================================================
--- z3c.securitytool/trunk/CHANGES.txt 2008-01-29 01:01:56 UTC (rev 83285)
+++ z3c.securitytool/trunk/CHANGES.txt 2008-01-29 02:17:52 UTC (rev 83286)
@@ -3,6 +3,13 @@
=======
+
+Version 0.2.1 (2008-01-27)
+--------------------------
+
+- Fixed bug with Permission Details
+
+
Version 0.2.0 (2008-01-26)
--------------------------
Modified: z3c.securitytool/trunk/README.txt
===================================================================
--- z3c.securitytool/trunk/README.txt 2008-01-29 01:01:56 UTC (rev 83285)
+++ z3c.securitytool/trunk/README.txt 2008-01-29 02:17:52 UTC (rev 83286)
@@ -1,16 +1,16 @@
-=====================================================
+===================================================================
Zope3 SecurityTool (z3c.securitytool)
-=====================================================
+===================================================================
This package is used as a tool to view all the permissions for any
view in any context. These permissions are gathered from the roles
groups and of course directly provided permissions.
-=====================================================
+ ===================================================================
Demo Instructions
-=====================================================
+ ===================================================================
You can run the demo by downloading just the securitytool package
Modified: z3c.securitytool/trunk/TODO.txt
===================================================================
--- z3c.securitytool/trunk/TODO.txt 2008-01-29 01:01:56 UTC (rev 83285)
+++ z3c.securitytool/trunk/TODO.txt 2008-01-29 02:17:52 UTC (rev 83286)
@@ -1,8 +1,6 @@
-* principal-role Allow/Deny
-
* Functional test
-* Discrimante by interface (see `zope.app.apidoc.presentattion.filterViewRegistrations`)
+* Discriminate by interface (see `zope.app.apidoc.presentattion.filterViewRegistrations`)
* Show the permission details as a graph
Modified: z3c.securitytool/trunk/src/z3c/securitytool/README.txt
===================================================================
--- z3c.securitytool/trunk/src/z3c/securitytool/README.txt 2008-01-29 01:01:56 UTC (rev 83285)
+++ z3c.securitytool/trunk/src/z3c/securitytool/README.txt 2008-01-29 02:17:52 UTC (rev 83286)
@@ -303,8 +303,44 @@
>>> manager.addHeader('Authorization', authHeader)
>>> manager.handleErrors = False
- >>> manager.open('http://localhost:8080/@@vum.html')
- >>> manager.open('http://localhost:8080/@@ud.html?principal=daniel')
+First we will check if the main page is available
+ >>> manager.open('http://localhost:8080/@@vum.html')
- >>> manager.open('http://localhost:8080/@@pd.html?principal=daniel&view=PUT')
+
+Now lets send the filter variable so our test is complete
+ >>> manager.open('http://localhost:8080/@@vum.html?FILTER=None&selectedSkin=ConcordTimes')
+
+
+And with the selected permission
+ >>> manager.open('http://localhost:8080/@@vum.html?FILTER=None&selectedSkin=ConcordTimes&selectedPermission=zope.Public')
+
+
+This is the principal detail page, you can get to by clicking on the
+principals name at the top of the form.
+ >>> manager.open('http://localhost:8080/@@ud.html?principal=daniel')
+ >>> 'Permission settings' in manager.contents
+ True
+
+
+And lets call the view without a principal
+ >>> manager.open('http://localhost:8080/@@ud.html')
+ Traceback (most recent call last):
+ ...
+ PrincipalLookupError: no principal specified
+
+Here is the view you will see if you click on the actual permission
+value in the matrix intersecting the view to the user on a public view.
+ >>> manager.open('http://localhost:8080/@@pd.html?principal=daniel&view=PUT')
+ >>> 'zope.Public' in manager.contents
+ True
+
+Ok lets send the command without the principal:
+ >>> manager.open('http://localhost:8080/@@pd.html?view=PUT')
+ Traceback (most recent call last):
+ ...
+ PrincipalLookupError: no user specified
+
+And now we will test it without the view name
+ >>> manager.open('http://localhost:8080/@@pd.html?principal=daniel')
+
More information about the Checkins
mailing list