Changeset 6604 for main/waeup.sirp/trunk


Ignore:
Timestamp:
14 Aug 2011, 06:47:43 (13 years ago)
Author:
Henrik Bettermann
Message:

We can add a global role by setting the attribute.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/browser/browser.txt

    r6597 r6604  
    3131  [u'myuniversity']
    3232
     33  >>> from zope.component.hooks import setSite
     34  >>> setSite(root['myuniversity'])
    3335
    3436Let's get the default view of a university::
     
    8587  ...<li class="message">Plugins were updated. See log file for details.</li>
    8688  ...
    87 
    8889
    8990We can export a university as XML::
     
    127128
    128129  >>> browser.getControl("edit", index=0).click()
     130  >>> print root['myuniversity']['users']['bob'].roles
     131  []
     132  >>> root['myuniversity']['users']['bob'].roles = ['waeup.PortalUser']
     133  >>> print root['myuniversity']['users']['bob'].roles
     134  ['waeup.PortalUser']
    129135  >>> browser.getControl("Save", index=0).click()
    130136  >>> browser.getControl("Save and return", index=0).click()
Note: See TracChangeset for help on using the changeset viewer.