@Test @WithMockUser(username = TEST_USER, roles = {ADMIN}) @Transactional(propagation = Propagation.REQUIRES_NEW, rollbackFor = Exception.class) public void deletePermissionsTest() { PermissionGrantVO grantVO = new PermissionGrantVO(); grantVO.setAclClass(AclClass.REFERENCE); grantVO.setId(reference.getId()); grantVO.setUserName(TEST_USER_2); grantVO.setPrincipal(true); grantVO.setMask(1); securityService.setPermissions(grantVO); Integer mask = permissionHelper.retrieveMaskForSid(reference, true, true, permissionHelper.convertUserToSids(TEST_USER_2)); Assert.assertEquals(1, mask.intValue()); securityService.deletePermissions(reference.getId(), AclClass.REFERENCE, TEST_USER_2, true); mask = permissionHelper.retrieveMaskForSid(reference, true, true, permissionHelper.convertUserToSids(TEST_USER_2)); Assert.assertEquals(0, mask.intValue()); }
@PreAuthorize(ROLE_ADMIN) public AclSecuredEntry deletePermissions(Long id, AclClass aclClass, String user, boolean isPrincipal) { return permissionManager.deletePermissions(id, aclClass, user, isPrincipal); }
AclPermissionSecurityService { @PreAuthorize(ROLE_ADMIN) public AclSecuredEntry deletePermissions(Long id, AclClass aclClass, String user, boolean isPrincipal) { return permissionManager.deletePermissions(id, aclClass, user, isPrincipal); } }
AclPermissionSecurityService { @PreAuthorize(ROLE_ADMIN) public AclSecuredEntry deletePermissions(Long id, AclClass aclClass, String user, boolean isPrincipal) { return permissionManager.deletePermissions(id, aclClass, user, isPrincipal); }  }
AclPermissionSecurityService { @PreAuthorize(ROLE_ADMIN) public AclSecuredEntry deletePermissions(Long id, AclClass aclClass, String user, boolean isPrincipal) { return permissionManager.deletePermissions(id, aclClass, user, isPrincipal); }  @PreAuthorize(ROLE_ADMIN) AclSecuredEntry setPermissions(PermissionGrantVO grantVO); @PreAuthorize(ROLE_ADMIN + OR + OWNER_BY_ID + OR + HAS_SPECIFIC_ROLE_BY_ACL_CLASS) AclSecuredEntry getPermissions(Long id, AclClass aclClass); @PreAuthorize(ROLE_ADMIN) AclSecuredEntry deletePermissions(Long id, AclClass aclClass, String user, boolean isPrincipal); @PreAuthorize(ROLE_ADMIN) AclSecuredEntry deleteAllPermissions(Long id, AclClass aclClass); @PreAuthorize(ROLE_ADMIN) AclSecuredEntry changeOwner(Long id, AclClass aclClass, String userName); }
AclPermissionSecurityService { @PreAuthorize(ROLE_ADMIN) public AclSecuredEntry deletePermissions(Long id, AclClass aclClass, String user, boolean isPrincipal) { return permissionManager.deletePermissions(id, aclClass, user, isPrincipal); }  @PreAuthorize(ROLE_ADMIN) AclSecuredEntry setPermissions(PermissionGrantVO grantVO); @PreAuthorize(ROLE_ADMIN + OR + OWNER_BY_ID + OR + HAS_SPECIFIC_ROLE_BY_ACL_CLASS) AclSecuredEntry getPermissions(Long id, AclClass aclClass); @PreAuthorize(ROLE_ADMIN) AclSecuredEntry deletePermissions(Long id, AclClass aclClass, String user, boolean isPrincipal); @PreAuthorize(ROLE_ADMIN) AclSecuredEntry deleteAllPermissions(Long id, AclClass aclClass); @PreAuthorize(ROLE_ADMIN) AclSecuredEntry changeOwner(Long id, AclClass aclClass, String userName);  }