On 6/18/06, Robin Fernandes <rewbs.soal(a)gmail.com> wrote:
Hi all,
The precise role of "programming rights" is not clear to me. I realise
it is used to prevent Groovy scripting (which can do all kinds of
mischief like System.exit() :) ), but it also blocks a number of API
functions. I can't quite see a pattern to the functions it blocks.
It blocks every action dangerous for the wiki. For knowing which
function is blocked by the programming right, you should give a look
to classes in the package API.
This is a problem for me, because I have sometimes suggested a
Velocity code snippet to a user but they could not execute it due to
lack of rights. There has always been a workaround, but as an admin, I
can't tell if I'm using functions which require the rights or not.
Also, I'm currently having a hard time with a plugin, of which the
main functionality executes fine when triggered from Velocity from a
doc saved with programming rights, but falls over in all kinds of ways
when I try to call it from a save notification implementation (in
which the context's rights depend on the user saving the doc, I
think).
One possible solution is to create another context object. You can see
how to do this on the groovy script for the import of database. You
use the same config, create a new XWiki object and set a user with
programming right. I've never done it, but i think it's working.
The browse svn is down, so i can't show you the file, but you will
easilly find it.
Jérémi