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#parseG…
JV/.