Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to check if certain user has "PERSONAL SPACE" permission using confluence java api?

Olexandr Polinkevych
Contributor
November 17, 2018

above...

1 answer

1 accepted

0 votes
Answer accepted
Santwana Sarangi {Appfire}
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.
November 28, 2018

Hi @Olexandr Polinkevych,

 

You can use the following api to check whether a user has personal space permission

SpacePermissionManager.hasPermission(SpacePermission.PERSONAL_SPACE_PERMISSION, null, <confluence user>)

 Here the second argument is space. As personal space is a global permission, space is null indicating the global permission.

Reference: https://docs.atlassian.com/atlassian-confluence/6.6.0/com/atlassian/confluence/security/SpacePermissionManager.html#hasAllPermissions-java.util.List-com.atlassian.confluence.spaces.Space-com.atlassian.user.User-

and

https://docs.atlassian.com/atlassian-confluence/6.6.0/com/atlassian/confluence/security/SpacePermission.html#PERSONAL_SPACE_PERMISSION

 

Thanks,

Santwana

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events