I want to revoke some permission from a user in a space but not able to find a way that works .
1. when iam trying with removeallpermission then all the access of user is revoked , sometime the user is deleted from his own space .
2)I have tried
SpacePermission spacePermission = SpacePermission.createUserSpacePermission(SpacePermission.EXPORT_SPACE_PERMISSION,space,user);
spacePermissionManager.removePermission(spacePermission);
but this is also not working and making no change in permissions.
List<SpacePermission>permissionsVal= space.getPermissions();
for(SpacePermission permission:permissionsVal){
if( permission.isUserPermission()){
User user= permission.getUserSubject();
if(permission.getType()=="EXPORTSPACE")
{
permissionsToRemove.add(permission);
}}}
I have tried it this way and its working fine to remove permission for user from a space .
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @neetubhatt Have you tried below interface?
void removeAllUserPermissions(ConfluenceUser user)
Link here.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
yes I have tried with removeAllUserPermissions but it deletes user from space which i dont want .
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.