Re: [xwiki-users] Set rights for parent page and recursively for all child pages of the page

2011-05-26 Thread Thomas Mortagne
On Thu, May 26, 2011 at 18:04, promatiker  wrote:
> Hello Thomas,
>
> thank you for your reply.
>
>
> Thomas Mortagne wrote:
>>
>> On Thu, May 26, 2011 at 09:19, Vincenzo Brancato
>>  wrote:
>>
>>> It's something you did, right ? Because that does not exists in
>>> standard XE as far as I know (parent/children right inheritance I
>>> mean).
>>
>
> You're right. The new site inherits the rights of the space not of the
> parent page. I checked this.
>
>
>
> Thomas Mortagne wrote:
>>
>> On Thu, May 26, 2011 at 09:19, Vincenzo Brancato
>>  wrote:
>>
>>
>>> There is a easy but not so clean way and a pretty hard but cleaner way
>>> on the long run:
>>> * you could write a listener (see
>>> http://extensions.xwiki.org/xwiki/bin/view/Extension/Observation+Module+Local)
>>> which, each time a document right is modified, reproduce it's right
>>> configuration to its children documents. You can even add the support
>>> for new child page in the same listener so that you support when a
>>> document parent is changed.
>>> * the hard way is to modify the right system itself so that it look at
>>> document parent right before looking and document space rights. See
>>> https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/user/impl/xwiki/XWikiRightServiceImpl.java
>>
>
> Both solutions are not very handy. Is there any possibility to set the new

The first one is very easy to do but for a developer yes. Also it have
the advantage other a simple script that it will take care of what you
need all the time automatically. You would have to execute your script
all the time.

> rights recursively to the child pages via bash directly in the server? I
> don't understand why this very important feature is not included in Xwiki
> right now. Am I the only person that needs a feature like this? I don't
> think every person that needs that feature writes his own script or is even
> able to. There has to be an alternative.

No there is nothing existing in standard to do that. It's actually not
really how we see parent document I guess. Setting right on space is
usually enough but I can see how this can be useful for you. Maybe you
can find something on http://extensions.xwiki.org

>
> --
> Enzo
>
>
> --
> View this message in context: 
> http://xwiki.475771.n2.nabble.com/Set-rights-for-parent-page-and-recursively-for-all-child-pages-of-the-page-tp6405935p6407597.html
> Sent from the XWiki- Users mailing list archive at Nabble.com.
> ___
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users
>



-- 
Thomas Mortagne
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Set rights for parent page and recursively for all child pages of the page

2011-05-26 Thread promatiker
Hello Thomas,

thank you for your reply.


Thomas Mortagne wrote:
> 
> On Thu, May 26, 2011 at 09:19, Vincenzo Brancato
>  wrote:
> 
>> It's something you did, right ? Because that does not exists in
>> standard XE as far as I know (parent/children right inheritance I
>> mean).
> 

You're right. The new site inherits the rights of the space not of the
parent page. I checked this.



Thomas Mortagne wrote:
> 
> On Thu, May 26, 2011 at 09:19, Vincenzo Brancato
>  wrote:
> 
> 
>> There is a easy but not so clean way and a pretty hard but cleaner way
>> on the long run:
>> * you could write a listener (see
>> http://extensions.xwiki.org/xwiki/bin/view/Extension/Observation+Module+Local)
>> which, each time a document right is modified, reproduce it's right
>> configuration to its children documents. You can even add the support
>> for new child page in the same listener so that you support when a
>> document parent is changed.
>> * the hard way is to modify the right system itself so that it look at
>> document parent right before looking and document space rights. See
>> https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/user/impl/xwiki/XWikiRightServiceImpl.java
> 

Both solutions are not very handy. Is there any possibility to set the new
rights recursively to the child pages via bash directly in the server? I
don't understand why this very important feature is not included in Xwiki
right now. Am I the only person that needs a feature like this? I don't
think every person that needs that feature writes his own script or is even
able to. There has to be an alternative.

-- 
Enzo


--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Set-rights-for-parent-page-and-recursively-for-all-child-pages-of-the-page-tp6405935p6407597.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Set rights for parent page and recursively for all child pages of the page

2011-05-26 Thread Thomas Mortagne
On Thu, May 26, 2011 at 09:19, Vincenzo Brancato  wrote:
> Hello,
>
> how can I set rights for pages recursively?
> I created a new page and set the rights for this page. When I create a new 
> child page, the child page inherits the rights of the parent page. And this 
> is great.

It's something you did, right ? Because that does not exists in
standard XE as far as I know (parent/children right inheritance I
mean).

>
> But when I change the rights of the parent page, only new pages inherit the 
> new rights. All existing child pages keep the rights that were set when I 
> created them.
>
> Is there any possibility to set rights recursively? So that changes to the 
> rights of a parent page can be applied to all child pages of this page?

There is a easy but not so clean way and a pretty hard but cleaner way
on the long run:
* you could write a listener (see
http://extensions.xwiki.org/xwiki/bin/view/Extension/Observation+Module+Local)
which, each time a document right is modified, reproduce it's right
configuration to its children documents. You can even add the support
for new child page in the same listener so that you support when a
document parent is changed.
* the hard way is to modify the right system itself so that it look at
document parent right before looking and document space rights. See
https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/user/impl/xwiki/XWikiRightServiceImpl.java

>
> Thx
>
> Enzo
>
> ___
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users
>



-- 
Thomas Mortagne
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users