Community Announcements have moved! To stay up to date, please join the new Community Announcements group today. Learn more
×Hi,
I need to remove space permissions for some specific groups. The current working code indicates that the removePermission() method in the SpacePermissionManager class is deprecated, and I'd like to switch to SpacePermissionManagerInternal as recommended.
Part of the current code, working correctly:
permissions.each {
spacePermissionManager.removePermission(it)
}
Part of the new code, not working:
def context = SpacePermissionContext.createDefault()
ComponentLocator.getComponent(SpacePermissionManagerInternal).removeAllPermissionsForGroup(oldGroup, context)
The new code generates an entry in the logs:
More than one instance of com.atlassian.confluence.internal.security.SpacePermissionManagerInternal found but none of them has key spacePermissionManagerInternal
There's probably something wrong with our Confluence instance, but what? Any ideas?
Regards
For cloud there is no SpacePermissionManager class for direct use in Confluence Cloud,
For Confluence Cloud, use the Confluence REST APIs, which allows the creation and modification of users, groups, and their roles within spaces.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.