I'm building a knowledge base which will contain 'internal only' articles that should not be readable/searchable by anonymous users.
To achieve this, 'internal only' documents will be restricted in view for anyone but internal people.
Is there any way (user macro) to display a panel depending on the page restrictions ?
You can get a list of a page's permissions by doing this:
#set($permsList = $content.permissions)
This sets permsList to an ArrayList of com.atlassian.confluence.security.ContentPermission objects (with type, userName, groupName properties). You can then iterate over it and draw your panel based on a particular value as you would any ArrayList.
Judging from your query you would want to hide some section of a page from anonymous users, if that is the case, you might want to use ServiceRocket Visibility Plugin. The plugin will allow you to hide a section of a page which could be a warning.
Hope it helps.
This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.Read more
Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...
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!
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