Changeset 6679 for main/waeup.sirp


Ignore:
Timestamp:
4 Sep 2011, 23:34:28 (13 years ago)
Author:
uli
Message:

Assign Student role when student is added to students container.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/students/container.py

    r6663 r6679  
    2020import os
    2121from zope.component.interfaces import IFactory
     22from waeup.sirp.interfaces import IUserAccount
    2223from waeup.sirp.students.interfaces import (
    2324    IStudentsContainer, IStudent, IStudentPayments, IStudentAccommodation)
     
    5455        accommodation = StudentAccommodation()
    5556        self[student.student_id]['accommodation'] = accommodation
     57        # assign student role for new student
     58        account = IUserAccount(student)
     59        account.roles = 'waeup.Student'
    5660        # Return student_id (only needed in tests)
    5761        return student.student_id
Note: See TracChangeset for help on using the changeset viewer.