Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to set restrictions on a page in blueprint?

Paweł
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 6, 2018

Hello everybody,

I have created space blueprint containing some page tree. My goal is to apply access permission to some page in hierarchy during creation, e.g. for 'managers' group. Is it possible? Where should it be declared?

Thank you for your help!

Paweł

2 answers

1 vote
Robert Reiner _smartics_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 7, 2018

I'm not sure if I understand your requirements correctly. But maybe you could use an event listener that applies restrictions to the new page after the page has been created by the blueprint wizard? Maybe by using com.atlassian.confluence.plugins.createcontent.api.events.BlueprintPageCreateEvent or related event?

I have not used the permission API by myself. I especially do not know if adding permissions after the page has been created is secure enough for your use case (or the implications if for any reason the event does not get triggered and the page remains unprotected).

0 votes
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 6, 2018

You can't do this because you could put in restrictions that would prevent people from using the blueprint.

Paweł
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 7, 2018

In the meantime I found similar question concerning use of ContentPermission class: https://community.atlassian.com/t5/Answers-Developer-Questions/Confluence-Blueprint-how-to-set-group-restrictions-by-blueprint/qaq-p/517913 and the second one with PageManager: https://community.atlassian.com/t5/Answers-Developer-Questions/Accessing-pageManager-from-a-custom-Confluence-blueprint/qaq-p/488032 . If it's not possible to add such a restriction, what is the proper destination of ContentPermission? I can't find any example of application.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events