On Tue, Aug 6, 2013 at 5:42 PM, Christian Meunier < christian.meunier@magelo.com> wrote:
Hi Denis,
Thanks for the snippet ! The drawback with that solution is that the creator of the page cannot delete his page anymore.
After reading Sergiu's reply, I was just about to tell you that.
So I end up creating another Right called 'advedit' and then I just patched a single method in org.xwiki.security.**authorization.internal.**XWikiCachingRightService :
https://gist.github.com/**Tlvenn/6165646<https://gist.github.com/Tlvenn/6165646>
And now works like a charm and any advanced edit is secured and out of reach of regular users.
Sure, just be careful that the XWikiCachingRightService is a temporary bridge that will be progressively deprecated in favor of the AuthorizationManager and an upcoming "ContextualAuthorizationManager". Moreover, the mapping between action and right will be moved to the Action module, once available. By the way, you may provide your new right without patching anything by calling AuthorizationManager#register, and you can change XWikiCachingRightService from xwiki.cfg using xwiki.authentication.rightsclass=...
Regards,
On 8/6/2013 21:09, Denis Gervalle wrote:
Hi Sergiu,
Are you really sure about that ? I am not aware of that change, I do not see it in sources, so, I suspect this is just a rumor. Very curious to see the commit about it, and the vote as well.
Christian, if you are willing to apply a patch for that, this one is easy: http://pastebin.com/w1dt3me2
Regards,
On Tue, Aug 6, 2013 at 2:47 PM, Christian Meunier < christian.meunier@magelo.com> wrote:
Hi Sergiu,
Any chance you can link the github commit of that ? Would very much like to have a look and integrate it myself... Thanks in advance !
On 8/6/2013 20:23, Sergiu Dumitriu wrote:
but a user that can edit a page can give himself the delete right.
But IIRC we recently disabled delete rights at the page level, so a user would need to have access to the space configuration to actually gain delete rights.
______________________________****_________________ devs mailing list devs@xwiki.org http://lists.xwiki.org/****mailman/listinfo/devs<http://lists.xwiki.org/**mailman/listinfo/devs> <http://**lists.xwiki.org/mailman/**listinfo/devs<http://lists.xwiki.org/mailman/listinfo/devs>
______________________________**_________________ devs mailing list devs@xwiki.org http://lists.xwiki.org/**mailman/listinfo/devs<http://lists.xwiki.org/mailman/listinfo/devs>
-- Denis Gervalle SOFTEC sa - CEO eGuilde sarl - CTO