[Building Sakai] How to add tool function options to realms like site.add

Jennings, Michael mike_jennings at unc.edu
Tue Apr 19 06:27:37 PDT 2011


Thanks to everyone for all of their help with this.  This will work great for me.

Mike

==============================================================================
Mike Jennings
Teaching and Learning Developer
University of North Carolina at Chapel Hill

Office: (919) 843-5013
Cell: (919) 442-8337
E-mail: mike_jennings at unc.edu

From: Anthony Whyte [mailto:arwhyte at umich.edu]
Sent: Tuesday, April 19, 2011 9:31 AM
To: Jennings, Michael
Cc: Developers Sakai-Dev; Swinsburg Steve
Subject: Re: [Building Sakai] How to add tool function options to realms like site.add

Do something like this in your init() method:

rwiki: https://source.sakaiproject.org/svn/rwiki/trunk/rwiki-impl/impl/src/java/uk/ac/cam/caret/sakai/rwiki/component/service/impl/RWikiSecurityServiceImpl.java

List l = functionManager.getRegisteredFunctions("rwiki.");
              if (!l.contains(SECURE_READ))
                     functionManager.registerFunction(SECURE_READ);
              if (!l.contains(SECURE_UPDATE))
                     functionManager.registerFunction(SECURE_UPDATE);
              if (!l.contains(SECURE_CREATE))
                     functionManager.registerFunction(SECURE_CREATE);
              if (!l.contains(SECURE_SUPER_ADMIN))
                     functionManager.registerFunction(SECURE_SUPER_ADMIN);
              if (!l.contains(SECURE_ADMIN))
                     functionManager.registerFunction(SECURE_ADMIN);


Plenty of examples exist in the code.  For example, see:

kernel: https://source.sakaiproject.org/svn/kernel/trunk/kernel-impl/src/main/java/org/sakaiproject/content/impl/BaseContentService.java

msgcntr: https://source.sakaiproject.org/svn/msgcntr/trunk/messageforums-component-impl/src/java/org/sakaiproject/component/app/messageforums/DefaultPermissionsManagerImpl.java


Cheers,

Anthony


On Apr 18, 2011, at 10:49 PM, Steve Swinsburg wrote:


Hi Michael,
You can register the list of functions with the security manager. If you wire up your code with spring and define an init method, you can put it in there.

Cheers

Sent from my iPhone

On 19/04/2011, at 1:59, "Jennings, Michael" <mike_jennings at unc.edu<mailto:mike_jennings at unc.edu>> wrote:
I am creating a new tool and would like to have a new function added to the list of security relams functions.  Is there some code that I can use as a example or documentation.

Thanks,

Mike

==============================================================================
Mike Jennings
Teaching and Learning Developer
University of North Carolina at Chapel Hill

Office: (919) 843-5013
Cell: (919) 442-8337
E-mail: mike_jennings at unc.edu<mailto:mike_jennings at unc.edu>

_______________________________________________
sakai-dev mailing list
sakai-dev at collab.sakaiproject.org<mailto: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<mailto:sakai-dev-unsubscribe at collab.sakaiproject.org> with a subject of "unsubscribe"
_______________________________________________
sakai-dev mailing list
sakai-dev at collab.sakaiproject.org<mailto: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<mailto: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/20110419/388ab7d9/attachment.html 


More information about the sakai-dev mailing list