Hi Eugen,
On Jul 4, 2012, at 8:47 AM, Eugen Colesnicov wrote:
Hamster wrote
If we grant rights to a group of users to view a page, we would like to
grant that right also to all the (sub)children of that page.
In a theory - yes. You should have event listener "on change" for parent
page. In this event listener need to define your type of changes (only page
rights changes), after - should search all child pages and make changes to
its rights same as parent page.
But in realty - mechanism of event listeners cannot work normally in
production
This is correct only for event listeners defined in groovy scripts in wiki pages but not
event listeners written in Java.
- for example, because it is not possible to have
enabled event
listeners after restarting application server. Every time after restarting
need to starting event listeners manually. Of course, existing some
possibilities to resolve this, bu all of them are not normally documented
and looks like "roof on the roof". Existing and another problems with event
listeners ...
For the XWiki platform need to well-organized mechanism of event listeners
...
For example, same how is organized Scheduler. Some place, where I can create
event, select type of them, enable it, look for logs and etc.
The idea is to finish implementing Wiki Component, see
https://github.com/xwiki-contrib/xwiki-platform-component-wiki
Then we would retrofit wiki macros to use wiki component and we could have a specialized
version for listeners too if we want but generally speaking you'll be able to register
any component using a wiki page and objects. And they'll registered on startup.
See also
http://jira.xwiki.org/jira/browse/XWIKI-5195
Thanks
-Vincent