Groovy - permissions query

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Groovy - permissions query

Esbach, Brandon
Groovy - permissions query

Hi All… again!

Looks like I need to use groovy for a few xwiki tools; but I just need to confirm permissions.  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?

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?



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Groovy - permissions query

Jean-Vincent Drean
2007/1/18, Esbach, Brandon <[hidden email]>:
> 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#parseGroovyFromPage(java.lang.String)

JV/.



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

RE: Groovy - permissions query

Esbach, Brandon
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: [hidden email] [mailto:[hidden email]] On Behalf Of
Jean-Vincent Drean
Sent: 18 January 2007 22:28
To: [hidden email]
Subject: Re: [xwiki-users] Groovy - permissions query

2007/1/18, Esbach, Brandon <[hidden email]>:
> 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/.




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws