Ignore:
Timestamp:
22 Sep 2013, 08:54:03 (11 years ago)
Author:
Henrik Bettermann
Message:

Define new local roles (see uniben ticket 900).

Allow the dynamical assignment of multiple local roles.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_dynamicroles.py

    r10226 r10639  
    4949    def setUp(self):
    5050        super(StudentPrincipalRoleManagerFunctionalTests, self).setUp()
    51         # assign clearance permissions for a virtual officer
     51        # assign permissions for a virtual officers
    5252        prm = IPrincipalRoleManager(self.app['faculties']['fac1']['dep1'])
    5353        prm.assignRoleToPrincipal('waeup.local.ClearanceOfficer', 'alice')
    5454        prm.assignRoleToPrincipal('waeup.local.PGClearanceOfficer', 'bob')
    5555        prm.assignRoleToPrincipal('waeup.local.UGClearanceOfficer', 'anne')
     56        prm.assignRoleToPrincipal('waeup.local.LocalStudentsManager', 'benita')
     57        prm.assignRoleToPrincipal('waeup.local.LocalWorkflowManager', 'benita')
    5658        return
    5759
     
    100102        result = prm.getRolesForPrincipal('anne')
    101103        self.assertEqual(result, [('waeup.StudentsOfficer', Allow)])
     104        # Multiple roles can be assigned
     105        result = prm.getRolesForPrincipal('benita')
     106        self.assertEqual(result, [
     107            ('waeup.WorkflowManager', Allow),
     108            ('waeup.StudentsManager', Allow)
     109            ])
    102110        return
Note: See TracChangeset for help on using the changeset viewer.