Perfect, thanks for the quick response.
I saw a few references on the mailing list for parsing groovy from a
separate page, my initial assumption was that it's optional, thanks
again for clearing that up too!
-----Original Message-----
From: jvdrean(a)gmail.com [mailto:jvdrean@gmail.com] On Behalf Of
Jean-Vincent Drean
Sent: 18 January 2007 22:28
To: xwiki-users(a)objectweb.org
Subject: Re: [xwiki-users] Groovy - permissions query
2007/1/18, Esbach, Brandon <Esbachb(a)tycoelectronics.com>om>:
If I understand correctly, you need programming rights
to run a groovy
script - does this mean all users that are viewing or
modifying a page
in xwiki with groovy scripts involved require
programming rights?
Hi,
"If I understand correctly, you need programming rights to run a groovy
script"
Not exactly : to be executed a groovy script needs to be in a WikiPage
saved by a XWikiUser who has the programming rights.
For eg:
A class has a groovy script in it to compare dates (eg "is it before
or after when xyz said it would be done"). This is setup at the
ClassSheet level.
-> On creating a document linked to that classt; will the user be able
-> to
run the groovy script attached to the ClassSheet linked to the
document?
If the ClassSheet has been saved by a XWikiUser with programming rights
all the pages which include the sheet will be displayed properly.
PS: Please note that mixing velocity and groovy in a page is not
recommanded (because of Groovy cache), the best practice is to create a
Groovy class in a dedicated page and to use it with the
xwiki.parseGroovyFromPage() [1] method (yep, we need to document this
:) ).
[1] :
http://build.xpertnet.biz/latestdoc/api/com/xpn/xwiki/api/XWiki.html#par
seGroovyFromPage(java.lang.String)
JV/.