[Building Sakai] How to register a new function and make it effective?

Matthew Jones jonespm at umich.edu
Mon Jun 20 07:05:52 PDT 2011


I added this documentation based on this thread and a few other ideas to
https://confluence.sakaiproject.org/display/BOOT/Adding+new+realm+security+functions

It wasn't mentioned here how you can do it with web services or SQL scripts,
but some hints are given on that page.

However, for your case, as a short term fix you *should* be able to just add
the realm functions you want to the !site.helper. The only problem(s) with
site.helper are :
- you or users can't remove a function on a site by site basis when it's
turned on in the helper
- it doesn't make any distinction by site type (project/course etc)

but it can be good for the short term until all of your courses/projects are
all newly created.

There are at least 3 other suggestions of this won't work for you. ;)

On Mon, Jun 20, 2011 at 9:04 AM, Shun Zhang <aaashun at gmail.com> wrote:

> Thanks, I understand it, and this works fine on the new sites, but I have
> to update the old sites' realms manually.
>
> I'll try the "Admin Site Role Permissions updater" later.
>
>
> On Mon, Jun 20, 2011 at 4:38 PM, Sam Chow <samchow at ln.edu.hk> wrote:
>
>>
>> Dear J-F
>>
>> Many Thanks!
>>
>> Cheers
>> Sam
>>
>>
>> Jean-Francois Leveque-2 wrote:
>> >
>> > You sure can!
>> >
>> > Admin Site Role Permissions updater
>> >
>> > Can be found in:
>> > https://source.sakaiproject.org/contrib/caret/admin-site-perms/trunk/
>> >
>> > Cheers
>> > J-F
>> >
>> > On 20/06/2011 08:22, Sam Chow wrote:
>> >>
>> >> oops!
>> >>
>> >> It is a great tool! But i cant find it, may i ask whats that name is
>> it?
>> >>
>> >>
>> >> Steve Swinsburg-3 wrote:
>> >>>
>> >>> There is also a tool in contrib which will backfill the permissions
>> for
>> >>> you, written by Aaron. Select the sites and it does it's thing.
>> >>>
>> >>> Cheers
>> >>> Steve
>> >>>
>> >>> Sent from my iPhone
>> >>>
>> >>> On 17/06/2011, at 2:25, "Diego del Blanco Orobitg"
>> >>> <diego.delblanco at samoo.es>  wrote:
>> >>>
>> >>>> Maybe it's not the problem and you have done this fine but.. but if
>> you
>> >>>> change the !site.template.course, you only change the template, but
>> all
>> >>>> the
>> >>>> old sites created before that moment doesn't update their realms. So
>> it
>> >>>> only
>> >>>> will work on new sites and if you enter in a previously created site,
>> >>>> the
>> >>>> role won't change.
>> >>>>
>> >>>> You must change in all the sites you want the
>> >>>> aid201105.questionpool.new
>> >>>> permissions (manually or with a webservice...)
>> >>>>
>> >>>> If you don't want, you can update the site helper realm.
>> >>>>
>> >>>> As said, I'm not sure that's the problem but the xml seems fine.
>> >>>>
>> >>>> Diego del Blanco Orobitg
>> >>>> Director de operaciones
>> >>>> diego.delblanco at samoo.es
>> >>>> Tlf: 963 936 915 - 653 683 489
>> >>>> www.samoo.es
>> >>>>
>> >>>>
>> >>>>
>> >>>> -----Mensaje original-----
>> >>>> De: shun.zhang at aispeech.com [mailto:shun.zhang at aispeech.com] En
>> nombre
>> >>>> de
>> >>>> Shun Zhang
>> >>>> Enviado el: viernes, 17 de junio de 2011 10:28
>> >>>> Para: sakai-dev at collab.sakaiproject.org
>> >>>> CC: diego.delblanco at samoo.es
>> >>>> Asunto: How to register a new function and make it effective?
>> >>>>
>> >>>> I'm now developing an app based on sakai 2.8.0. I want to make my
>> tool
>> >>>> hidden to student and visiable to teacher, so I do the following
>> >>>> steps, but it doesn't work:
>> >>>>
>> >>>> 1. register new fuctions in registration xml (I don't want to use the
>> >>>> existed "content.new" function).
>> >>>> <registration>
>> >>>>      <tool id="aid201105.questionpool" title="Question Pool"
>> >>>> description="">
>> >>>>          <category name="course" />
>> >>>>          <configuration name="functions.require"
>> >>>> value="aid201105.questionpool.new" />
>> >>>>      </tool>
>> >>>>      <function name="aid201105.questionpool.new" />
>> >>>>      <function name="aid201105.questionpool.read" />
>> >>>>      <function name="aid201105.questionpool.revise" />
>> >>>>      <function name="aid201105.questionpool.delete" />
>> >>>> </registration>
>> >>>>
>> >>>> 2. authorize
>> >>>>
>> >>>> Admin's workspace -->  Reams -->  Edit: Realm !site.template.course
>> -->
>> >>>> Set the Functions for Role "Instructor" -->  check
>> >>>> "aid201105.questionpool.new"
>> >>>>
>> >>>> 3. then I login and enter a course site as an instructor, but I can
>> >>>> not see "Question Pool" tool on the left hand menu.
>> >>>>
>> >>>>    And securityService.unlock(userId, "aid201105.questionpool.new",
>> >>>> siteService.siteReference(siteId)) returns false.
>> >>>>
>> >>>>
>> >>>> I'm confused now.
>> >>>>
>> >>>> Thanks!
>> >>>> -----
>> >>>> No se encontraron virus en este mensaje.
>> >>>> Comprobado por AVG - www.avg.com
>> >>>> Versión: 10.0.1382 / Base de datos de virus: 1513/3708 - Fecha de
>> >>>> publicación: 06/16/11
>> >>>>
>> >>>> _______________________________________________
>> >>>> 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"
>> >>> _______________________________________________
>> >>> 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"
>> >>>
>> >>
>> >>
>> >> -----
>> >> Best Regards,
>> >>
>> >> Sam Chow
>> >> Research Assistant
>> >> Lingnan Unviersity
>> >> Hong Kong
>> > _______________________________________________
>> > 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"
>> >
>>
>>
>> -----
>> Best Regards,
>>
>> Sam Chow
>> Research Assistant
>> Lingnan Unviersity
>> Hong Kong
>> --
>> View this message in context:
>> http://old.nabble.com/-Building-Sakai--How-to-register-a-new-function-and-make-it-effective--tp31867201p31883756.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"
>>
>
>
> _______________________________________________
> 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/20110620/97fba3dd/attachment.html 


More information about the sakai-dev mailing list