Links to Draft pages are visible

We are evaluating Adhoc Workflow and we have noticed a distressing behaviour with our workflow.

If you have a published page that includes macros like Children Display or Content by Label it can display links to pages that have never been published. If the user clicks on the link, then they receive a Not Permitted operation error.

Is there a way to avoid these links from appearing?

Regards,

Ramsay

1 answer

1 accepted

Hi Ramsay,

If you are using a space workflow that is automatically active on all pages in the space(see the "Workflows" page in the space admin), you can add this page created trigger to your workflow markup:

{trigger:pagecreated}
{add-restriction:type=View|group=GROUP_NAME}
{trigger}

Where GROUP_NAME is the group name of the group(or groups) that can view draft versions. "user=USER_NAME, USER_NAME" can be used instead of the group parameter. You can also use as many {add-restriction} macros in the trigger as well. This will hide the page links from users.

Also, add this trigger to remove those view restrictions when reaching the published state:

{trigger:statechanged|state=Published}
{remove-restriction:type=View}
{trigger}

Change "Published" to the name of the state in your workflow that has the "final=true" parameter. This will remove all page view restrictions so all users who have view permission in space will once again see the links to the page.

Give that a try and let us know if you have any further questions.

Thanks,
Miguel

Thanks for the prompt response. Your suggestion gives the results that I want.

Cheers,

Ramsay

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jul 10, 2018 in Confluence

We want to see the templates you've created in Confluence!

Hi Community, Jessica here from the Confluence Product Marketing team!  July’s community challenge is all about sharing pictures  — and as an extension of our first post on what ...

770 views 23 12
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you