I’m configuring templates in XWiki (cloud instance) and I’m trying to implement a “draft → published” visibility flow for newly created pages.

Goal (original idea)

  • Users create new pages from my custom template using the standard “Seite erstellen / Create page” dialog (template tile).

  • Every newly created page should be hidden from basic users by default.

  • Only authors/editors (specific groups) should be able to view/edit the new page while it’s a draft.

  • Once the page is “approved”, I want to reclassify it by adding/removing a tag (e.g., add tag published), and then the page becomes visible to basic users automatically.

So basically:

  • No published tag → restricted (draft)

  • Has published tag → public

What I tried / what blocks me (short)

  • I added XWiki.XWikiRights objects (allow editor groups, deny XWikiAllGroup view) on the template page, expecting them to be copied to new pages.

  • But when creating a page from the template via the standard Create dialog / Template Provider, the new page does not include the XWiki.XWikiRights objects (so the restriction isn’t applied automatically).

  • In my XWiki.TemplateProviderClass, “Action on create” only controls what happens after creation (Edit / Save+Edit / Save+View) — I don’t see a “copy/clone template including objects/rights” option.

  • I also tried Visibility Restrictions in the Template Provider, but it can hide the template entry in the create dialog and still doesn’t give me the “copy rights to created pages” behavior

Questions

  • Is there a supported way to make pages created from a template/provider copy all XObjects, specifically XWiki.XWikiRights, so page restrictions are applied automatically?

  • If not, what’s the recommended approach for my use case: “new pages hidden by default; become visible when a tag like published is set” in the same location (no draft subspace/container)?

  • Would this require a workflow app, or an event listener / automation? If so, what’s the best practice on XWiki Cloud?

What you are trying to achieve should be doable with https://extensions.xwiki.org/xwiki/bin/view/Extension/XWiki%20Publication%20Workflow%20Application

Once you setup the PublicationWorkflow and added the PublicationWorkflowPanel to the sidebar of the draft and target space, you can push a document to the target space using a review process.