Forums

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

Remove user permissions from Confluence space

Tomislav Sablic
Contributor
November 4, 2020

Hello,

 

Could someone help me with ScriptRunner REST endpoint running on Confluence Server 7.2.0?

 

I just need to remove user permissions from space only. For example, I pass username and space key, and the script removes all permissions. I've been trying to use SpaceManager, SpaceManagerInternal but my context is always null. 

 

def space = spaceManager.getSpace(spaceKey)

SpacePermissionContext context = SpacePermissionContext.builder().build()

spacePermissionManager.removeAllUserPermissions(user,context)

 

The builder().build() doesn't work, and createDefault() as well.

How do I use this context in the right way?

 

Thanks.

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events