[Building Sakai] How to get Sakai Role from CM Role?
Brian Jones
bjones86 at uwo.ca
Thu Jul 11 10:43:37 PDT 2013
Hi,
I can access CM section membership/roles like this:
Set<Membership> sectionMembers =
courseManagementService.getSectionMemberships( sectionID );
For( Member member : sectionMembers )
String cmRole = member.getRole();
Member.getRole() returns the CM role, like 'I', or 'S'. But I need to
compare them to site roles like 'Instructor', and 'Student'.
I need to be able to access the CM Role to Site Role map, and I can see that
BaseRoleResolver has the method convertRole( String cmRole );
However, I'm not sure how to access this class. Do I need to inject it via
Spring in components.xml? Or can I just make my own instance whenever I need
it?
Any help is appreciated! Thanks,
Brian Jones
Applications Development
Information Technology Services
Support Services Building, Room 4326
Western University
(519) 661-2111 x86969
bjones86 at uwo.ca
More information about the sakai-dev
mailing list