[Building Sakai] Registering new function (authz tool)

Stephen Marquard stephen.marquard at uct.ac.za
Tue Jul 7 14:45:28 PDT 2009


Hi,

Typically your tool wouldn't set the permissions for particular roles -
normally that's done by a Sakai admin in one or more template realms,
and/or your tool would expose the Permissions helper to allow users with
the site.upd permission to set the permissions per realm.

But for an example of setting permissions in code, see

https://source.sakaiproject.org/contrib/caret/admin-site-perms/trunk/tool/src/java/org/sakaiproject/adminsiteperms/tool/ActionBean.java

You're probably not saving the authzgroup once you're done.

Regards
Stephen 
 
>>> André Zanchetta<andrecomacento at gmail.com> 7/7/2009 10:50 PM >>> 
Hi
I'm new here at the Sakai maillist.
I'm not sure if I'm posting the question at the right place, so if I'm
making a mistake, please tell me.

With the Authz tools, I'm trying to register a new function and, after
that,
to allow the Student role to execute this function.

On the init() method in the ExternalLogicImpl.java, I put the
'functionManager.registerFunction("func name");' command.
The function 'func name' becames registered (it is returned by the
"functionManager.getRegisteredFunctions()"), but it is not being writed
at
the database.
At the same way, when I get the student Role object and execute its
'allowFunction("func name")', the role gains this permission only
during the
execution time: it isn't added any new register at database and during
the
next execution, the Student Role starts without this permission.

Am I forgetting to execute any method? Am I executing these methods at
wrong
places...?

Once: I'm noob at these maillist. If I'm posting on the wrong place,
please
forgive.

Thanks.
Andrew.



More information about the sakai-dev mailing list