Project project = requestManager.getProjectById(projectId);
model.addAttribute("project", project);
sample.setProject(project);
if (Arrays.asList(user.getRoles()).contains("ROLE_TECH")) {
SecurityProfile sp = new SecurityProfile(user);
LimsUtils.inheritUsersAndGroups(sample, project.getSecurityProfile());
sample.setSecurityProfile(sp);
}
else {
sample.inheritPermissions(project);