Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,295,544
Community Members
 
Community Events
165
Community Groups

How to get SpacePermissions using Java Confluence API (> 7.3.0)

Earlier we used to get Space Permissions using below code

com.atlassian.confluence.spaces.Space space = spaceManager.getSpace(spaceKey);

List<SpacePermission> spList = space.getPermissions();

But now we are upgrading to Confluence 7.13.4 and spaceManager.getSpace(spaceKey) is deprecated and I can't find a way to pull com.atlassian.confluence.spaces.Space which has most of the information. 

According to Confluence 7.13.4 API ( https://docs.atlassian.com/ConfluenceServer/javadoc/7.13.4/com/atlassian/confluence/spaces/SpaceManager.html#getSpace-java.lang.String- )  " since 7.3.0, use SpaceService.find(Expansion...) in plugins and SpaceManagerInternal in core where applicable ", So when I use above method to pull Space it returns a new Space ( com.atlassian.confluence.api.model.content.Space) class instance with minimum details unlike old one. 

When I try to use SpacePermissionManager  (https://docs.atlassian.com/ConfluenceServer/javadoc/7.13.4/com/atlassian/confluence/security/SpacePermissionManager.html) or  PermissionManager methods accept only com.atlassian.confluence.spaces.Space but not new Space ( com.atlassian.confluence.api.model.content.Space)

Without the old Space (com.atlassian.confluence.spaces.Space) class I couldn't find a way to pull SpacePermissions.

Thanks in advance!!

1 answer

0 votes
Dominic Lagger Community Leader May 12, 2022

Hi @Krishna Gottapu 

I would suggest to you to ask this question in the developer community

Regards, Dominic

Suggest an answer

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

Confluence: Where work and wellness meet

Feeling overwhelmed by the demands of work and life? With a 25% increase in the prevalence of anxiety and depression worldwide during the pandemic, for most of us, it’s a resounding yes . 🙋‍♀️ ...

914 views 12 27
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