[Building Sakai] New User Role

Steve Swinsburg s.swinsburg at lancaster.ac.uk
Fri May 29 00:59:23 PDT 2009


Hi,

You need to add it to the appropriate realm for that site type, then  
propagate it to all sites. Ie if the site type you want to add the new  
role to is 'project', then you need to create the new role in the ! 
site.template.project realm. Note that in an OOTB Sakai this realm  
doesn't exist, so you can just copy the !site.template realm to ! 
site.template.project.

If your role should go to all sites regardless of type you can create  
the new role in the !site.template realm.

Then, when new sites are created with that site type, they will  
inherit this new role.

Use the Admin Realms tool. You can either duplicate one of the  
existing roles or start from scratch.

Now, you need to backfill the new role into the sites you need. By far  
the easiest method I use is a webservice and Perl script to iterate  
over and copy the new role into the sites. I've attached copyRole.txt  
which is a web service that you should put into SAKAI-SRC/webservices/ 
axis/src/webapp/SakaiScript.jws and rebuild/redeploy the webservices  
project.

Then, enable web service logins in sakai.properties  
(webservices.allowlogin=true for 2.5.x but a bit more complicated in  
2.6.x+, post back if you need help).

Now, using the attached perl script, add in the sites you want to  
edit, the template site, the roles you want to sync and the relevant  
username/password/urls, and run it. It will iterate over the sites and  
sync up the roles from the template.

If you are hesitant, use the test script first which will just check  
your webservice connection.


cheers,
Steve

---
Steve Swinsburg
Portal Systems Developer
Centre for e-Science
Lancaster University
Lancaster
LA1 4YT

email: s.swinsburg at lancaster.ac.uk
phone: +44 (0) 1524 594870







On 29/05/2009, at 7:12 AM, KetanNale wrote:

>
> How we can assign unique role to user for all sites.
> It should not dependent on access and maintain roles of  site.
>
> -- 
> View this message in context: http://www.nabble.com/New-User-Role-tp23774713p23774713.html
> Sent from the Sakai - Development mailing list archive at Nabble.com.
>
> _______________________________________________
> 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/20090529/05828b70/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sync-roles-in-sites.pl
Type: text/x-perl-script
Size: 2466 bytes
Desc: not available
Url : http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20090529/05828b70/attachment.bin 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20090529/05828b70/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test-connection.pl
Type: text/x-perl-script
Size: 510 bytes
Desc: not available
Url : http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20090529/05828b70/attachment-0001.bin 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20090529/05828b70/attachment-0002.html 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: copyRole.txt
Url: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20090529/05828b70/attachment.txt 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20090529/05828b70/attachment-0003.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2437 bytes
Desc: not available
Url : http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20090529/05828b70/attachment-0002.bin 


More information about the sakai-dev mailing list