vimpagliazzo wrote:
I have then modified the Document Sheet code, and I have tried to use groovy scripting instead of velocity. However when creating a new object, I get the error
Failed to execute the [groovy] macro org.xwiki.rendering.macro.MacroExecutionException: You don't have the right to execute this script
Rule of thumb: you can't use groovy in class sheets. A newly created document using a sheet (i.e. including a document) with groovy code in it can't be saved without programming rights. Velocity code - even the privileged API - will work as long as the sheet has been saved by a user with programming rights; afaik this is due to differences in the permissions evaluation (cp. http://markmail.org/message/aaxf5g34knxdvvoh). Solution: 1. re-write your code in velocity or 2. use velocity in the sheet to include your groovy code through <code>parseGroovyFromPage</code> (cp. http://platform.xwiki.org/xwiki/bin/view/DevGuide/GroovyNotificationTutorial) Philipp -- View this message in context: http://xwiki.475771.n2.nabble.com/object-template-and-groovy-tp5859642p58621... Sent from the XWiki- Users mailing list archive at Nabble.com.