Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Auto restrict page to creator and a defined group

office@vonhellberg.eu February 13, 2014

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

0 votes
office@vonhellberg.eu February 14, 2014

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}

0 votes
Steve Gerstner [bridgingIT]
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 13, 2014

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

office@vonhellberg.eu February 14, 2014

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

0 votes
office@vonhellberg.eu February 13, 2014

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@'

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events