[Building Sakai] Permission in sakai tool

Steve Swinsburg s.swinsburg at lancaster.ac.uk
Mon Jul 13 08:45:45 PDT 2009


Your tool needs to actually check if this permission is set for the  
current user, its not automatic.

Use SecurityService.unlock(String function, String reference) in your  
code to test if the user is allowed to perform the associated action.
You may also need SiteService.siteReference(String siteid) to get the  
proper reference of the site to use in the unlock method.

cheers,
Steve




On 13 Jul 2009, at 16:43, ngoc hon wrote:

> Hello all,
>
> I have problem with permission on tool.
> I wrote a tool to add add many users to sakai.
> Sakai supports 2 permissions for this tool:
> // permissions
>     public final static String ITEM_WRITE_ANY =  
> "nluaddsite.write.any";
>     public final static String ITEM_READ_HIDDEN =  
> "nluaddsite.read.hidden";
>
> And from UI, I see 2 checkboxs for 2 above permissions.
> With student role, 2 checkboxs are unchecked. But when I login with  
> student role, I still see and process on my tool.
>
> How can I make my tool hidden from student role?
> Hope your help.
>
> Thanks!
>
> Ngoc Hon
> _______________________________________________
> sakai-dev mailing list
> sakai-dev at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>
> TO UNSUBSCRIBE: send email to sakai-dev-unsubscribe at collab.sakaiproject.org 
>  with a subject of "unsubscribe"

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20090713/2264ad7a/attachment.html 


More information about the sakai-dev mailing list