[xwiki-devs] question about programming rights and SQL extraction...
hello, I would like to write some scripts which do some more complex SQL extraction requests using for example $xwiki.search(sql)... no modif of the DB, just extraction for presentation... I would prefer not to be forced to code a new Java module just for this... But this function is protected by programming rights... So I must give programming rights to allow people to view this page... I find a bit disturbing because programming rights have a "sensitive" meaning in my head... What's your point of view about this? What's the lightest, cleverest and fairest way to allow this? Any advice? :) regards Pascal
hello, I would like to write some scripts which do some more complex SQL extraction requests using for example $xwiki.search(sql)... no modif of the DB, just extraction for presentation... I would prefer not to be forced to code a new Java module just for this...
But this function is protected by programming rights... So I must give programming rights to allow people to view this page... I find a bit disturbing because programming rights have a "sensitive" meaning in my head...
I really think, that concept of programming right in xwiki is fundamental flaw: evaluation of program is not programming. So, I just usually grant programming rights to everyone. Imho, if we want to fix this, than 'check programming right' in plugins must be applied not to user of page, but to page author, on which called function is situated. (I plan switch to such semantics in next release of xwikisql)
What's your point of view about this? What's the lightest, cleverest and fairest way to allow this? Any advice? :)
regards Pascal _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
[email protected] wrote:
hello, I would like to write some scripts which do some more complex SQL extraction requests using for example $xwiki.search(sql)... no modif of the DB, just extraction for presentation... I would prefer not to be forced to code a new Java module just for this...
But this function is protected by programming rights... So I must give programming rights to allow people to view this page... I find a bit disturbing because programming rights have a "sensitive" meaning in my head...
I really think, that concept of programming right in xwiki is fundamental flaw: evaluation of program is not programming.
So, I just usually grant programming rights to everyone.
Imho, if we want to fix this, than 'check programming right' in plugins must be applied not to user of page, but to page author, on which called function is situated. (I plan switch to such semantics in next release of xwikisql)
That is the case already ! The only thing you have to take care of is that "regular users" (without programming rights) do not edit pages that needs to be saved with this programming right. To do this, the best practice is to write the code in a protected space (like XWiki/), where such regular users cannot edit, and to include that code from the target document (in space Main/ or any other space). This way, if somebody does edit the target document, the code that needs programming rights will continue to work for everybody. Jerome.
What's your point of view about this? What's the lightest, cleverest and fairest way to allow this? Any advice? :)
regards Pascal _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
Pascal Voitot wrote:
hello, I would like to write some scripts which do some more complex SQL extraction requests using for example $xwiki.search(sql)... no modif of the DB, just extraction for presentation... I would prefer not to be forced to code a new Java module just for this...
But this function is protected by programming rights... So I must give programming rights to allow people to view this page... I find a bit disturbing because programming rights have a "sensitive" meaning in my head...
You don't have to give programming rights to the *viewers* of such pages, only to the *authors*. When $xwiki.search() is executed, the rights of the page author are checked, not the ones of the current user (viewer). Happy coding and using xwiki, Anca Luca
What's your point of view about this? What's the lightest, cleverest and fairest way to allow this? Any advice? :)
regards Pascal _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
Hi Pascal, On Oct 3, 2008, at 11:57 AM, Pascal Voitot wrote:
hello, I would like to write some scripts which do some more complex SQL extraction requests using for example $xwiki.search(sql)... no modif of the DB, just extraction for presentation... I would prefer not to be forced to code a new Java module just for this...
But this function is protected by programming rights... So I must give programming rights to allow people to view this page...
This is not correct. The programming right are only required to *save* the page. To view it you only need view rights... Thanks -Vincent
I find a bit disturbing because programming rights have a "sensitive" meaning in my head...
What's your point of view about this? What's the lightest, cleverest and fairest way to allow this? Any advice? :)
regards Pascal
Hi Pascal,
On Oct 3, 2008, at 11:57 AM, Pascal Voitot wrote:
hello, I would like to write some scripts which do some more complex SQL extraction requests using for example $xwiki.search(sql)... no modif of the DB, just extraction for presentation... I would prefer not to be forced to code a new Java module just for this...
But this function is protected by programming rights... So I must give programming rights to allow people to view this page...
This is not correct. The programming right are only required to *save* the page. To view it you only need view rights...
Way, this fixed (!) So, my previous reply was error. great !
Thanks -Vincent
I find a bit disturbing because programming rights have a "sensitive" meaning in my head...
What's your point of view about this? What's the lightest, cleverest and fairest way to allow this? Any advice? :)
regards Pascal
devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
ok I had not understood at all what "programming rights" meant! I remember you had already told me but don't know why, I absolutely wanted "programming rights" to be something else :) In fact, I think this was just an impression: "programming" had something to deal with "sensitive" so I didn't want to use it if I could do without but this is no more possible :) Ok, in this case, this is really great because I can do everything I need :) thanks a lot Pascal On Fri, Oct 3, 2008 at 12:04 PM, Vincent Massol <[email protected]> wrote:
Hi Pascal,
On Oct 3, 2008, at 11:57 AM, Pascal Voitot wrote:
hello, I would like to write some scripts which do some more complex SQL extraction requests using for example $xwiki.search(sql)... no modif of the DB, just extraction for presentation... I would prefer not to be forced to code a new Java module just for this...
But this function is protected by programming rights... So I must give programming rights to allow people to view this page...
This is not correct. The programming right are only required to *save* the page. To view it you only need view rights...
Thanks -Vincent
I find a bit disturbing because programming rights have a "sensitive" meaning in my head...
What's your point of view about this? What's the lightest, cleverest and fairest way to allow this? Any advice? :)
regards Pascal
devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
Pascal Voitot wrote:
hello, I would like to write some scripts which do some more complex SQL extraction requests using for example $xwiki.search(sql)... no modif of the DB, just extraction for presentation... I would prefer not to be forced to code a new Java module just for this...
But this function is protected by programming rights... So I must give programming rights to allow people to view this page... I find a bit disturbing because programming rights have a "sensitive" meaning in my head...
What's your point of view about this? What's the lightest, cleverest and fairest way to allow this? Any advice? :)
You could rewrite your query... I usually select the documents that contain the data I'm interested in (using searchDocuments), and then display the data from those documents. It is slower, indeed, but I don't need programming rights. If too much data is involved, and performance is important, then I use programming rights. -- Sergiu Dumitriu http://purl.org/net/sergiu/
participants (6)
-
Anca Paula Luca -
Jerome Velociter -
Pascal Voitot -
rssh@gradsoft.com.ua -
Sergiu Dumitriu -
Vincent Massol