Ignore:
Timestamp:
12 Dec 2011, 14:11:21 (13 years ago)
Author:
Henrik Bettermann
Message:

Implement local CourseAdviser? roles. These roles can be assigned in departments and certificates. There are 6 different roles, one for each study level. getRolesForPrincipal grants the additional waeup.StudentsCourseAdviser? role only if the current level of a student corresponds with the level number in the external role name.

To do: Assign local roles on CertificateManageFormPage?. Add browser tests.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/university/certificate.py

    r7321 r7334  
    3232    """
    3333    grok.implements(ICertificate, ICertificateAdd)
     34
     35    @property       # Make this method read_only and looking like an attr.
     36    def local_roles(cls):
     37        return ['waeup.local.CourseAdviser100',
     38                'waeup.local.CourseAdviser200',
     39                'waeup.local.CourseAdviser300',
     40                'waeup.local.CourseAdviser400',
     41                'waeup.local.CourseAdviser500',
     42                'waeup.local.CourseAdviser600',
     43                ]
    3444
    3545    def __init__(self, code=u'NA', title=u'Unnamed Certificate',
Note: See TracChangeset for help on using the changeset viewer.