[xwiki-users] Best approach to hiding code

2014-11-06 Thread Bryn Jeffries
I've written several scripts in Groovy that I want to make available to other users, but some of them contain information that I don't wish people to see (queries giving away schema details, connection passwords for JDBC/LDAP, etc). As I understand it if a person is able to view a page in which

Re: [xwiki-users] Best approach to hiding code

2014-11-06 Thread Thomas Mortagne
If you want to stay with Groovy the cleanest is probably to register your groovy code logic and data as a script service component and then call that script service (probably using Velocity) in the page where the user have view right. The script service is registered once and the user does not

Re: [xwiki-users] Best approach to hiding code

2014-11-06 Thread Thomas Mortagne
It's also a lot better for performance since it means you groovy code is built only once when it's registered. On Thu, Nov 6, 2014 at 12:36 PM, Thomas Mortagne thomas.morta...@xwiki.com wrote: If you want to stay with Groovy the cleanest is probably to register your groovy code logic and data

Re: [xwiki-users] Best approach to hiding code

2014-11-06 Thread Eduard Moraru
Hi, Well, your groovy code requires PR to execute anyway, so how about this idea? You have your page A that has all the groovy code that is saved with your user name (so the page gets PR) and that is viewable by any user so they can run it. Then you have this other page B that has an object of