Source:
<code>public String getProjectDetails(@PathVariable("projectid") String projectid, Principal principal, Model model) throws QuadrigaStorageException, NoSuchRoleException, QuadrigaAccessException { String userName = principal.getName(); IProject project = projectManager.getProjectDetails(projectid); List<IWorkSpace> workspaceList = wsManager.listActiveWorkspace(projectid, userName); List<IWorkSpace> collaboratorWorkspaceList = wsManager.listActiveWorkspaceByCollaborator(projectid, userName); List<IWorkSpace> deactiveWorkspaceList = wsManager.listDeactivatedWorkspace(projectid, userName); List<IWorkSpace> archivedWorkspaceList = wsManager.listArchivedWorkspace(projectid, userName); int deactivatedWSSize = deactiveWorkspaceList == null ? 0 : deactiveWorkspaceList.size(); int archivedWSSize = archivedWorkspaceList == null ? 0 : archivedWorkspaceList.size(); model.addAttribute("project", project); model.addAttribute("workspaceList", workspaceList); model.addAttribute("collabworkspacelist", collaboratorWorkspaceList); model.addAttribute("deactivatedWSSize", deactivatedWSSize); model.addAttribute("archivedWSSize", archivedWSSize); Map<String, Boolean> collaboratorRoles = projectSecurity.getCollaboratorRoles(userName, projectid); if (projectSecurity.isProjectOwner(userName, projectid)) { model.addAttribute("owner", 1); } else { model.addAttribute("owner", 0); } if (collaboratorRoles.get(RoleNames.ROLE_PROJ_COLLABORATOR_EDITOR)) { model.addAttribute("editoraccess", 1); } else { <START> model.addAttribute("editoraccess", 0); <END> } if (collaboratorRoles.get(RoleNames.ROLE_PROJ_COLLABORATOR_ADMIN)) { model.addAttribute("isProjectAdmin", true); } else { model.addAttribute("isProjectAdmin", false); } if (collaboratorRoles.get(RoleNames.ROLE_PROJ_COLLABORATOR_CONTRIBUTOR)) { model.addAttribute("isProjectContributor", true); } else { model.addAttribute("isProjectContributor", false); } return "auth/workbench/project"; }</code><technical_language>true/false for other roles, changing well</technical_language>

Target:
public String getProjectDetails(@PathVariable("projectid") String projectid, Principal principal, Model model) throws QuadrigaStorageException, NoSuchRoleException, QuadrigaAccessException { String userName = principal.getName(); IProject project = projectManager.getProjectDetails(projectid); List<IWorkSpace> workspaceList = wsManager.listActiveWorkspace(projectid, userName); List<IWorkSpace> collaboratorWorkspaceList = wsManager.listActiveWorkspaceByCollaborator(projectid, userName); List<IWorkSpace> deactiveWorkspaceList = wsManager.listDeactivatedWorkspace(projectid, userName); List<IWorkSpace> archivedWorkspaceList = wsManager.listArchivedWorkspace(projectid, userName); int deactivatedWSSize = deactiveWorkspaceList == null ? 0 : deactiveWorkspaceList.size(); int archivedWSSize = archivedWorkspaceList == null ? 0 : archivedWorkspaceList.size(); model.addAttribute("project", project); model.addAttribute("workspaceList", workspaceList); model.addAttribute("collabworkspacelist", collaboratorWorkspaceList); model.addAttribute("deactivatedWSSize", deactivatedWSSize); model.addAttribute("archivedWSSize", archivedWSSize); List<String> collaboratorRoles = projectSecurity.getCollaboratorRoles(userName, projectid); if (projectSecurity.isProjectOwner(userName, projectid)) { model.addAttribute("owner", true); } else { model.addAttribute("owner", false); } if (collaboratorRoles.contains(RoleNames.ROLE_PROJ_COLLABORATOR_EDITOR)) { model.addAttribute("isProjectEditor", true); } else { model.addAttribute("isProjectEditor", false); } if (collaboratorRoles.contains(RoleNames.ROLE_PROJ_COLLABORATOR_ADMIN)) { model.addAttribute("isProjectAdmin", true); } else { model.addAttribute("isProjectAdmin", false); } if (collaboratorRoles.contains(RoleNames.ROLE_PROJ_COLLABORATOR_CONTRIBUTOR)) { model.addAttribute("isProjectContributor", true); } else { model.addAttribute("isProjectContributor", false); } return "auth/workbench/project"; }