@Test @WithMockUser(TEST_USER_NO_READ) @Transactional(propagation = Propagation.REQUIRES_NEW) public void loadProjectContainsOnlyRefIfNoPermissionTest() { Project loaded = projectSecurityService.load(project.getId()); Assert.assertNotNull(loaded); Assert.assertNotNull(loaded.getLeaves()); Assert.assertEquals(1, loaded.getLeaves().size()); Assert.assertNotNull(loaded.getChildren()); Assert.assertEquals(0, loaded.getChildren().size()); }
@AclTree @AclMask @PreAuthorize(ROLE_USER) public Project load(Long projectId) { return projectManager.load(projectId); }
ProjectSecurityService { @AclTree @AclMask @PreAuthorize(ROLE_USER) public Project load(Long projectId) { return projectManager.load(projectId); } }
ProjectSecurityService { @AclTree @AclMask @PreAuthorize(ROLE_USER) public Project load(Long projectId) { return projectManager.load(projectId); }  }
ProjectSecurityService { @AclTree @AclMask @PreAuthorize(ROLE_USER) public Project load(Long projectId) { return projectManager.load(projectId); }  @AclFilterAndTree @AclMaskList @PreAuthorize(ROLE_USER) List<Project> loadTopLevelProjects(); @AclFilterAndTree @AclMaskList @PreAuthorize(ROLE_USER) List<Project> loadProjectTree(Long parentId, String referenceName); @AclTree @AclMask @PreAuthorize(ROLE_USER) Project load(Long projectId); @AclTree @AclMask @PreAuthorize(ROLE_USER) Project load(String projectName); @PreAuthorize(ROLE_ADMIN + OR + ROLE_PROJECT_MANAGER + OR + "hasPermissionOnProject(#parentId, 'WRITE')") Project create(Project convertFrom, Long parentId); @PreAuthorize(ROLE_ADMIN + OR + ROLE_PROJECT_MANAGER + OR + "projectCanBeMoved(#projectId, #parentId)") void moveProjectToParent(Long projectId, Long parentId); @AclTree @PreAuthorize(ROLE_ADMIN + OR + PROJECT_WRITE_AND_ITEM_READ) Project addProjectItem(Long projectId, Long biologicalItemId); @AclTree @PreAuthorize(ROLE_ADMIN + OR + PROJECT_WRITE_AND_ITEM_READ) Project removeProjectItem(Long projectId, Long biologicalItemId); @PreAuthorize(ROLE_ADMIN + OR + PROJECT_WRITE_AND_ITEM_READ) void hideProjectItem(Long projectId, Long biologicalItemId); @PreAuthorize(ROLE_ADMIN + OR + "projectCanBeDeleted(#projectId, #force)") Project deleteProject(long projectId, Boolean force); }
ProjectSecurityService { @AclTree @AclMask @PreAuthorize(ROLE_USER) public Project load(Long projectId) { return projectManager.load(projectId); }  @AclFilterAndTree @AclMaskList @PreAuthorize(ROLE_USER) List<Project> loadTopLevelProjects(); @AclFilterAndTree @AclMaskList @PreAuthorize(ROLE_USER) List<Project> loadProjectTree(Long parentId, String referenceName); @AclTree @AclMask @PreAuthorize(ROLE_USER) Project load(Long projectId); @AclTree @AclMask @PreAuthorize(ROLE_USER) Project load(String projectName); @PreAuthorize(ROLE_ADMIN + OR + ROLE_PROJECT_MANAGER + OR + "hasPermissionOnProject(#parentId, 'WRITE')") Project create(Project convertFrom, Long parentId); @PreAuthorize(ROLE_ADMIN + OR + ROLE_PROJECT_MANAGER + OR + "projectCanBeMoved(#projectId, #parentId)") void moveProjectToParent(Long projectId, Long parentId); @AclTree @PreAuthorize(ROLE_ADMIN + OR + PROJECT_WRITE_AND_ITEM_READ) Project addProjectItem(Long projectId, Long biologicalItemId); @AclTree @PreAuthorize(ROLE_ADMIN + OR + PROJECT_WRITE_AND_ITEM_READ) Project removeProjectItem(Long projectId, Long biologicalItemId); @PreAuthorize(ROLE_ADMIN + OR + PROJECT_WRITE_AND_ITEM_READ) void hideProjectItem(Long projectId, Long biologicalItemId); @PreAuthorize(ROLE_ADMIN + OR + "projectCanBeDeleted(#projectId, #force)") Project deleteProject(long projectId, Boolean force);  }