Hamster wrote
I should have searched the Extensions first...
http://extensions.xwiki.org/xwiki/bin/view/Extension/Setting+Rights
I guess we could use this as a starting point to read the $rightsObject of
the current page and apply that $rightsObject to all the child
pages...right?
Yes, you are right ... but problem - HOW this portion of code WILL BE
AUTOMATICALLY STARTED after each right changes? Need something like
"trigger" ...
For this need to use another example
http://extensions.xwiki.org/xwiki/bin/view/Extension/Title+Post+Processing+…
This is another portion of code - Event Listener. But as I said, right now,
this methodology have some problems (as explained vmassol, event listeners
technology will be expanded soon).
Temporary resolution - didn't make any special event listener (which will
trigger your event), but include in page something like:
#if ($context.action == "view")
...
#end
and inside put your code regarding to rights changing of a child pages.
It means, that updating of all child pages rights will be before each
viewing of a parent page... But it is a bad solution, especially if you have
too much child pages or often simply opens parent. Process of opening parent
page can be extremely slow. But it is possible to run this asynchronously
(using ajax). Look this
http://extensions.xwiki.org/xwiki/bin/view/Extension/Ajax+and+Show+Hide+Mac…
--
Best regards
Eugen Colesnicov
--
View this message in context:
http://xwiki.475771.n2.nabble.com/Apply-rights-automaticly-to-child-pages-t…
Sent from the XWiki- Users mailing list archive at
Nabble.com.