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

confluence spaceblueprint permissions

Merijn de Jonge October 2, 2015

I want to restrict view/edit permissions of spaces that are created with my space blueprint to particular user groups. When I not create a space with the blueprint all confluence users have read access.

Is it possible to set default space permissions from within a space blueprint?

2 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Tim Eddelbüttel
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.
October 2, 2015

You can enable the restrict space checkbox in you .soy file of your space blueprint.

...
{template .dialogForm}
<form action="#" method="post" id="create-project-management-space-form" class="common-space-form aui">
    {call Confluence.Templates.Blueprints.CreateSpace.createSpaceFormFields}
        {param showSpacePermission: true /}
        {param fieldErrors: $fieldErrors /}
        {param name: $name /}
        {param key: $key /}
    {/call}
    <fieldset>
...
{/template}
...

In the example showSpacePermission is set to false. Set this to true will enable the checkbox and then only an admin can see the space.

Regards,
Tim 

Merijn de Jonge October 5, 2015

By setting state.pageData.spacePermission = "private"; in the javascript code, I no longer need the checkbox on the form and I van enforce that the space will be private.

0 votes
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.
October 2, 2015

I do not know if this could be configured in XML and I have not done this before, but I think with the help of a listener and a space permission manager this could be accomplished.

  • com.atlassian.confluence.security.SpacePermissionManager
  • com.atlassian.event.api.EventListener
@EventListener
  public void onSpaceBlueprintCreate(final SpaceBlueprintCreateEvent event) {
    ...
  }

Just a thought ...

TAGS
AUG Leaders

Atlassian Community Events