Changeset 6203 for main/waeup.sirp/trunk/src/waeup/sirp/authentication.txt
- Timestamp:
- 27 May 2011, 02:05:02 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/authentication.txt
r6202 r6203 120 120 True 121 121 122 When an account get deleted, also the local roles of the owner get 123 removed. 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 133 The local role is set now: 134 135 >>> from zope.securitypolicy.interfaces import IPrincipalRoleMap 136 >>> IPrincipalRoleMap(faculty).getPrincipalsAndRoles() 137 [('waeup.PortalManager', 'alice', PermissionSetting: Allow)] 138 139 But when we delete Alices account from ZODB: 140 141 >>> del root['app']['users']['alice'] 142 >>> IPrincipalRoleMap(faculty).getPrincipalsAndRoles() 143 [] 144 145 the local role has gone. 146 147 122 148 Logging in via side bar 123 149 =======================
Note: See TracChangeset for help on using the changeset viewer.