It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Auto restrict page to creator and a defined group

Hi all,

we have created a scaffolding template for some confidential data, that should be visible only by a group of lawers and the creator (creators can be every user).

We could tell everybody that they should restrict the page to "me" and the group "lawers". But it might be too risky that some confidential content could be red by non authorized confluece users, if authors forget to set permissions.

So the Idea was to find a way to auto-assign restrictions to new created pages in a specified space. I read the run/CLI Plugin documentation by Bob Swift but I did find any clue how to get the creator of a page programmatically.

Does anybody have an idea how to auto-restrict pages to the creator and a specified group?

thanks

philipp

3 answers

I tried this with no success:

--action runFromContentList --search "perm" --space KNOW --common '--action addPermissions --permissions edit --id @pageId@ --userId @creator@'

or

--action runFromPageList  --space cli --common '--action addPermissions --permissions edit --id @pageId@ --userId @creator@'

Hi Philipp,

you can write your own plugin. All you need is an EventListener.

If writing a plugin is an option for you?

Regards

Steve

Hi Steve, thanks for the hint. But now I found a solution with the run and CLI plugin. (See below)

I found a solution with the run and CLI plugin.

As the user creates a page the restriction is set. There is also a similar script for the lawer-group.

{run:replace=name:$current_user_id:Name|titleRun=Change permission|autorun=true}
{cli:profile=confluence|hideOutput=false}
--action addPermissions --permissions view --id $page_id --userId $name
{cli}
{run}

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Confluence

6 Awesome Ways to Apply Trello, JIRA and Confluence to your Project

I attended  Atlassian Summit 2019  and learned a lot from the presenters, attendees and knowledgeable Atlassian product managers. The presentations I attended focused on applying Agile, pla...

3,866 views 15 38
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you