How to get Space Permissions?

Do any if you know if there is a method in Confluence similar to getContentPermissionSets(String token, String contentId) to get the users or groups which have access to a Space? I can extract the ones for pages with this method but I also need to get Spaces permissions as well

I've checked the documentation and there are methods like:

* getSpaceLevelPermissions(String token)
* getPermissionsForUser(String token, String spaceKey, String userName)
* getPermissions(String token, String spaceKey)

But they are not useful as they give permissions for the current user or provides a list of permissions that may be granted to a space.

Thanks in advance for any help!

3 answers

1 accepted

This widget could not be displayed.

You are taking about remote APIs. No, not directly. But you can use getSpacePermissionList from Confluence Command Line Interface or use a similar technique.

Thanks Bob. Is there any limitation regarding the Confluence Version? I'm using version 3.5.5

Shouldn't be. But you are using OnDemand - so your Confluence version is 4.2.x isn't it?

I tried the method and I'm getting the permissions information thanks for the suggestion!

This is what my Confluence says: Atlassian Confluence 3.5.5. So I'm not sure what you mean by that other version

Well, your question says you are an OnDemand user, so that is why I thought you would be on the current OnDemand version of Confluence. No matter though.

Hi Bob thanks again for the info, just one last thing. I tried your app with Confluence 3.3 and most of the methods except the getSpacePermissionList. I get:

“Client error: This action requires the Confluence release level 3.5 or higher. The release level of this server is 3.3.”

Is there any restriction with the API for version 3.3 that avoids getting this information? I'm using the latest version of the Command Line app. I'm asking because I need to find a way to extract space permissions for Confluence 3.3, so if the Command line doesn't work I would have to create a plugin to extract this info. I was thinking about the getGroupsWithPermissions and getUsersWithPermissions methods in here http://docs.atlassian.com/atlassian-confluence/3.3/com/atlassian/confluence/security/SpacePermissionManager.html.

From your experience, do you think this would work? Or am I doing something wrong with the Command Line app?

Thanks in advance

You said earlier you were on 3.5.5? The CLI will only support this capability on 3.5.x and above as older releases were not compatible with the implementation. There are no remote APIs for this capability, the implementation renders the screens. You could customize the implementation for your specific version, but I don't have time to help you with that at this time.

Yes, I tried it with 3.5 before but the code I'm writing has to work also for 3.3 version (sorry for the confusion). I don't need to extract this information to display it in the UI.

I'm trying to build a Confluence connector and for each document I need to extract the ACLs. I have what I need for Pages but the SOAP API doesn't provide the ACLs for Spaces, so I was planning to use your CLI but since it is not compatible with version 3.3 I have to build my own plugin to get this information. So basically my question was that if you were aware of any kind of restriction with the API and versions prior 3.5 that I should considered or if it is not even possible to get this Space information if I'm using version 3.3

Thanks again for all the information!

This widget could not be displayed.

You are taking about remote APIs. No, not directly. But you can use getSpacePermissionList from Confluence Command Line Interface or use a similar technique.

This widget could not be displayed.

You are taking about remote APIs. No, not directly. But you can use getSpacePermissionList from Confluence Command Line Interface or use a similar technique.

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Published Tuesday in Confluence

Add-on evaluation with confluence templates

Atlassian market place contains number of Apps/Addons which improves the capability of out of the box Atlassian products. It is good to follow a plugin evaluation process before install add-ons. So t...

107 views 12 6
Read article

Atlassian User Groups

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!

Find my local user group

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

Groups near you