[Checkins] SVN: five.grok/trunk/src/five/grok/ftests/viewlet/security.py Test viewlet security.

Sylvain Viollon sylvain at infrae.com
Sun Nov 16 14:36:51 EST 2008


Log message for revision 93016:
  Test viewlet security.
  
  

Changed:
  U   five.grok/trunk/src/five/grok/ftests/viewlet/security.py

-=-
Modified: five.grok/trunk/src/five/grok/ftests/viewlet/security.py
===================================================================
--- five.grok/trunk/src/five/grok/ftests/viewlet/security.py	2008-11-16 17:11:47 UTC (rev 93015)
+++ five.grok/trunk/src/five/grok/ftests/viewlet/security.py	2008-11-16 19:36:51 UTC (rev 93016)
@@ -1,6 +1,7 @@
 """
   >>> from five.grok.ftests.viewlet.security import *
-  >>> id = getRootFolder()._setObject("manfred", Mammoth(id='manfred'))
+  >>> root = getRootFolder()
+  >>> id = root._setObject("manfred", Mammoth(id='manfred'))
 
   >>> from Products.Five.testbrowser import Browser
   >>> browser = Browser()
@@ -13,6 +14,16 @@
   </body>
   </html>
 
+  >>> root.manfred.manage_permission('View management screens', ['Anonymous',])
+  >>> browser.reload()
+  >>> print browser.contents
+  <html>
+  <body>
+  <p>A common gallery with rembrandt</p>
+  <p>Non exposed content</p>
+  </body>
+  </html>
+
 """
 from five import grok
 



More information about the Checkins mailing list