Ignore:
Timestamp:
27 May 2011, 02:05:02 (13 years ago)
Author:
uli
Message:

#38

File:
1 edited

Legend:

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

    r6202 r6203  
    120120   True
    121121
     122When an account get deleted, also the local roles of the owner get
     123removed. Let's setup a local role for `alice`:
     124
     125   >>> faculty = Faculty()
     126   >>> root['app']['alice_fac'] = faculty
     127   >>> role_manager = IPrincipalRoleManager(faculty)
     128   >>> role_manager.assignRoleToPrincipal(
     129   ...    'waeup.PortalManager', 'alice')
     130   >>> notify(LocalRoleSetEvent(faculty, 'waeup.PortalManager', 'alice',
     131   ...                          granted=True))
     132
     133The local role is set now:
     134
     135   >>> from zope.securitypolicy.interfaces import IPrincipalRoleMap
     136   >>> IPrincipalRoleMap(faculty).getPrincipalsAndRoles()
     137   [('waeup.PortalManager', 'alice', PermissionSetting: Allow)]
     138
     139But when we delete Alices account from ZODB:
     140
     141   >>> del root['app']['users']['alice']
     142   >>> IPrincipalRoleMap(faculty).getPrincipalsAndRoles()
     143   []
     144
     145the local role has gone.
     146
     147
    122148Logging in via side bar
    123149=======================
Note: See TracChangeset for help on using the changeset viewer.