[Building Sakai] Effecting permissions when using role switcher
    David Wafula 
    davidwaf at gmail.com
       
    Thu Dec  1 02:15:25 PST 2011
    
    
  
On Thu, Dec 1, 2011 at 10:59 AM, Stephen Marquard <
stephen.marquard at uct.ac.za> wrote:
>
> Also you would need to pass a real site id - it would be meaningless to
> set the "view as" role in a template authzgroup like
> !group.template.course.
>
>
I have tried this, still no luck:
String currentSiteId = toolManager.getCurrentPlacement().getContext();
String effectiveRole=securityService.getUserEffectiveRole(currentSiteId);
effectiveRole is still null.
I even tried:
 String currentSiteId = toolManager.getCurrentPlacement().getContext();
 Site site = siteService.getSite(currentSiteId);
 String idToUse=site.getId();
String effectiveRole=securityService.getUserEffectiveRole(idToUse);
Still null.
And this:
AuthzGroup ag = authzGroupService.getAuthzGroup(currentSiteId);
String effectiveRole=securityService.getUserEffectiveRole(ag,getId());
Null.
Am sure am missing something somewhere.
-- 
David Wafula
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20111201/80674528/attachment.html 
    
    
More information about the sakai-dev
mailing list