Changeset 6681 for main/waeup.sirp/trunk/src
- Timestamp:
- 5 Sep 2011, 10:03:55 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/students/container.py
r6679 r6681 20 20 import os 21 21 from zope.component.interfaces import IFactory 22 from zope.securitypolicy.interfaces import IPrincipalRoleManager 22 23 from waeup.sirp.interfaces import IUserAccount 23 24 from waeup.sirp.students.interfaces import ( … … 55 56 accommodation = StudentAccommodation() 56 57 self[student.student_id]['accommodation'] = accommodation 57 # assignstudent role for new student58 # Assign global student role for new student 58 59 account = IUserAccount(student) 59 60 account.roles = 'waeup.Student' 61 # Assign local StudentRecordOwner role 62 role_manager = IPrincipalRoleManager(self[student.student_id]) 63 role_manager.assignRoleToPrincipal( 64 'waeup.local.StudentRecordOwner', student.student_id) 60 65 # Return student_id (only needed in tests) 61 66 return student.student_id
Note: See TracChangeset for help on using the changeset viewer.