Comala hide pages in certain states
Asked by Kathryn Smith:

I am very new at Comala Document Management add on - this morning actually. I'm not sure if what I am about to ask is possible but here goes.

Below is a snippet of a custom workflow and its associated markup.

I want to know if, apart from a certain group, I can hide pages from being viewed by everyone else in confluence if the page state does not equal Approved or Expired.

Or

If I have the configuration setting to see only the last published version it still gives everyone in the business the ability to view the 'for review' or 'rejected' version of the page. Is there a way I can restrict it so they can only ever see the Approved status page and not have the option the view the others?

![Annotation 2020-05-20 154338.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/95569i434048AE66F44C1F/image-dimensions/541x217?v=v2 "Annotation 2020-05-20 154338.jpg")

{workflow:name=Space 1: IT Department Manual\|key=spaceworkflow--375584516}  
{description}  
Builds on the Basic Approval workflow adding an Expired state after a set period of the page being approved with no updates.  
{description}  
{workflowparameter:Due Date\|description=After this period pages will be set to 'Expired'\|type=duration}  
PT5M  
{workflowparameter}  
{state:For Review\|approved=Approved\|rejected=Rejected\|colour=#00B8D9}  
{approval:Review this page\|assignable=true\|allowedassignusers=pxteam\|user=pxteam}  
{state}  
{state:Rejected\|updated=For Review}  
{state}  
{state:Approved\|final=true\|updated=For Review\|expired=Expired\|duedate=@Due Date@\|changeduedate=true}  
{state}  
{state:Expired\|approved=Approved\|rejected=Archive\|updated=For Review\|colour=#FF7e00}  
{approval:Review this page for expired content\|assignable=true\|allowedassignusers=pxteam\|user=pxteam}  
{state}  
{state:Archive\|hidefrompath=true\|colour=#ff5630}  
{approval:Review this page\|assignable=true\|user=pxteam}  
{state}  
{trigger:statechanged\|state=For Review}  
{send-email:user=pxteam\|subject=@pagetitle@ submitted for review\|mimetype=text/html}  
@pagelatest@ has been submitted for review by [@User](/t5/user/viewprofilepage/user-id/115298)@.  

Please reveiw the page and either approve or reject as required.  
{send-email}  
{trigger}  
{trigger:statechanged\|state=Expired}  
{send-email:user=pxteam\|subject=@pagetitle@ has expired\|mimetype=text/html}  
@pagelatest@ has been been moved to an expired state as it has not been modified in 365 days.  

Please reveiw the contents of the page and and either approve or reject as required.  
{send-email}  
{trigger}  
{trigger:statechanged\|state=Rejected}  
{send-email:user=@modifier@\|subject=@pagetitle@ has been rejected\|mimetype=text/html}  
@pagelatest@ has been been rejected by the approver(s). Please review the comments and amend accordingly. Alternitavely delete the article if not required.  

{send-email}  
{trigger}  
{workflow}


Answers:
author: James Conway
body: Hi [@Kathryn Smith](/t5/user/viewprofilepage/user-id/3930263)

You can set page restrictions when your state changes, see our documentation here: <https://wiki.comalatech.com/display/CDML/Add%2C+remove+and+set+page+restrictions>

Let me know if you have any other questions or do reach out to our support team at <https://support.comalatech.com/>  
Kind regards

James  
Senior Product Manager


Tags: comala-workflows

confluence-server

server