Hi,
I'm trying to create a script that will remove space permissions of inactive users.
This is what I got so far:
import com.atlassian.spring.container.ContainerManager;
import com.atlassian.confluence.user.UserAccessor;
import com.atlassian.confluence.user.ConfluenceUser;
import com.atlassian.sal.api.component.ComponentLocator
import com.atlassian.confluence.internal.security.SpacePermissionManagerInternal;
import com.atlassian.confluence.spaces.SpaceManager
import com.atlassian.confluence.internal.security.SpacePermissionContext;
UserAccessor userAccessor = (UserAccessor) ContainerManager.getComponent("userAccessor");
def spaceManager = ComponentLocator.getComponent(SpaceManager)
def spacePermissionManager = ComponentLocator.getComponent(SpacePermissionManagerInternal)
def user = userAccessor.getUserByName('<username>')
SpacePermissionContext context = SpacePermissionContext.builder().build()
spacePermissionManager.removeAllUserPermissions(user, context);
But the script does nothing at the moment. Does anyone know how to remove space permissions of a user?
best regards,
Filip
So the quick answer is that Atlassian did not build Cloud in a way that enabled us to do all sorts of things we could do on server. (That "we" is not just Adaptavist, it's all of us)
Behavriours and REST endpoints need a lot of support from Atlassian, and it's mostly not there.
That said, we (Adaptavist) have been working with Atlassian to move to being able to support stuff like this, and in May, we were able to release a Beta for Behaviours - see https://community.atlassian.com/t5/Marketplace-Apps-Integrations/Behaviours-for-Jira-Cloud/ba-p/2034151
REST endpoints are also on the list...
Hey Nic,
I also came to know from some of the folks from Atlassian about this but could you let me know when would REST end points feature be available in Script runner cloud ?
Also could you let me know if there are any other plugins or workaround available for having REST end points working in JIRA cloud ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I don't have a timeline for this yet.
There's no other app that does it because Atlassian doesn't yet support apps that can. And there's nothing to "work around", it's a function that simply is not there.
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.
Hi Nic,
Could you please share me the link from where i can download the Beta version of Script runner for JIRA Cloud.
I have currently installed the script runner on jira cloud but it does not have Behaviour feature ?
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.