[Building Sakai] Getting User Role in a site Programmatically

Stephen Marquard stephen.marquard at uct.ac.za
Tue Nov 22 09:47:01 PST 2011


The first is an account type rather than a role which you'd have to get
through the UserDirectoryService. The second is a role within an
authorization group (site realm) which you can get through the site or
group membership.

But in almost all cases you should check the user's effective
permissions rather than their role. Even if you want to figure out
whether they're an instructor or TA, you can use the "role marker"
permissions such as section.role.ta. If you hard-code role name checks,
then you risk the tool/service not working in other deployments where
the role names may be different.

Regards
Stephen 
 

-- 
Stephen Marquard, Acting Director
Centre for Educational Technology, University of Cape Town
http://www.cet.uct.ac.za
Email / IM (Jabber/XMPP): stephen.marquard at uct.ac.za
Phone: +27-21-650-5037 Cell: +27-83-500-5290 


>>> Mustansar Mehmood <mustansar at rice.edu> 11/22/2011 7:03 PM >>> 
Hi,
     Sakai users seem to have two types of roles
1-Assigned to them in Sakai in general when a user is registered 
(Student/TA/Instructor)
2-Role assigned to user for a particular site for instance a teacher
may 
be taking another class as a student or a student might be TA in
another 
class.
I am trying to figure out  a way for getting role assigned to each user

in a particular site. SiteService API doesn't seem to give that out or

may be i am overseeing some details.
Thanks,
Mustansar

-- 
Mustansar Mehmood
Educational System Developer&  Integrator

Information Technology
6100 Main St. MS 119
Houston Texas 77005

Phone:(713)348-2523
Fax  :(713)348 6099
email:mustansar at rice.edu





I have yet to see any problem, however complicated, which, when,you 
looked at it in the right way, did not become still more complicated.
     -- Poul Anderson







###

UNIVERSITY OF CAPE TOWN 

This e-mail is subject to the UCT ICT policies and e-mail disclaimer
published on our website at
http://www.uct.ac.za/about/policies/emaildisclaimer/ or obtainable from
+27 21 650 9111. This e-mail is intended only for the person(s) to whom
it is addressed. If the e-mail has reached you in error, please notify
the author. If you are not the intended recipient of the e-mail you may
not use, disclose, copy, redirect or print the content. If this e-mail
is not related to the business of UCT it is sent by the sender in the
sender's individual capacity.

###
 


More information about the sakai-dev mailing list