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.
Look at line 48 (the error message gives you the line on which it failed). That line has a getId() call on the object "issue", but that object does not exist (that's what the "null object" part of the error means).
So look at where that should be being created, because that line is not finding the issue.
Hello,
Thanks for your reply.
I'm new to scriptrunner. Could you please let me know how to create object?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
By getting it from somewhere - look to where "issue" is defined in your code - that is going wrong.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.