I want to restrict the page title to avoid certain things. How do I veto creating a page? I saw
https://developer.atlassian.com/display/CONFDEV/Event+Listener+Module
but it said events are not vetoable.
Version 3.4.8.
Community moderators have prevented the ability to post new answers.
By the time the event is generated, the page has already been created and saved to the database. If you want to prevent a page from being saved based on certain conditions, you need to execute some custom code before the page is saved, before the doeditpage.action.
I think the 'easiest' way to do this (kind of a hack!) is to write a servlet filter plugin module that filters any incoming requests to the doeditpage.action and, if a condition is detected that should prevent the page from being saved, short-circuits the request.
A more 'architected' solution would be to use the Conveyor plugin to override the doeditpage.action with your own implementation.
I tried to run the Conveyor - People Directory blocking example, and it throws an exception when I recycle Tomcat and it starts up.
https://studio.plugins.atlassian.com/wiki/display/LIBCNV/Hijacking+the+People+Directory#HijackingthePeopleDirectory-BlockingAccess
<11>[TEAM]: ERROR 27 Jul 2012 12:25:37,009 [Spring executor 10] com.atlassian.plugin.osgi.factory.UnrecognizedModuleDescriptorServiceTrackerCustomizer "Unable to transform org.randombits.confluence.conveyor:adminActions into actual plugin module using factory org.randombits.confluence.conveyor.impl.ConveyorModuleDescriptorFactory@2a16c143"
<11>java.lang.IllegalArgumentException: Module creator factory cannot be null
<11> at org.apache.commons.lang.Validate.notNull(Validate.java:203)
<11> at com.atlassian.plugin.descriptors.AbstractModuleDescriptor.<init>(AbstractModuleDescriptor.java:59)
<11> at org.randombits.confluence.conveyor.ConveyorModuleDescriptor.<init>(ConveyorModuleDescriptor.java:29)...
<11>[TEAM]: ERROR 27 Jul 2012 12:25:37,009 [Spring executor 10] com.atlassian.plugin.osgi.factory.UnrecognizedModuleDescriptorServiceTrackerCustomizer "Unable to transform com.bloomberg.confluence.bb-confluence-plugin:bbActionOverrides into actual plugin module using factory org.randombits.confluence.conveyor.impl.ConveyorModuleDescriptorFactory@2a16c143"
<11>java.lang.IllegalArgumentException: Module creator factory cannot be null
<11> at org.apache.commons.lang.Validate.notNull(Validate.java:203)
<11> at com.atlassian.plugin.descriptors.AbstractModuleDescriptor.<init>(AbstractModuleDescriptor.java:59)
<11> at org.randombits.confluence.conveyor.ConveyorModuleDescriptor.<init>(ConveyorModuleDescriptor.java:29)
atlassian-plugin.xml:
<conveyor name="BB Action Overrides" key="bbActionOverrides" resource="/conveyor-config.xml"/>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.