AddWSController { @AccessPolicies({ @ElementAccessPolicy(type = CheckedElementType.PROJECT, paramIndex = 3, userRole = { RoleNames.ROLE_COLLABORATOR_OWNER, RoleNames.ROLE_PROJ_COLLABORATOR_ADMIN, RoleNames.ROLE_PROJ_COLLABORATOR_CONTRIBUTOR }) }) @RequestMapping(value = "auth/workbench/{projectid}/workspace/add", method = RequestMethod.POST) public String addWorkSpaceRequest(@Validated @ModelAttribute("workspace") Workspace workspace, BindingResult result, @PathVariable("projectid") String projectid, Model model, Principal principal, RedirectAttributes redirectAttrs, Locale locale) throws QuadrigaStorageException, QuadrigaAccessException { if (result.hasErrors()) { model.addAttribute("workspace", workspace); model.addAttribute("wsprojectid", projectid); model.addAttribute("show_error_alert", true); model.addAttribute("error_alert_msg", messageSource.getMessage("workspace.add.not.created", new Object[]{}, locale)); return "auth/workbench/workspace/addworkspace"; } modifyWSManger.addWorkspaceToProject((IWorkspace)workspace, projectid, principal.getName()); redirectAttrs.addFlashAttribute("show_success_alert", true); redirectAttrs.addFlashAttribute("success_alert_msg", "Workspace was successfully added."); return "redirect:/auth/workbench/projects/" + projectid; }  @AccessPolicies({ @ElementAccessPolicy(type = CheckedElementType.PROJECT, paramIndex = 1, userRole = { RoleNames.ROLE_COLLABORATOR_OWNER, RoleNames.ROLE_PROJ_COLLABORATOR_ADMIN, RoleNames.ROLE_PROJ_COLLABORATOR_CONTRIBUTOR }) }) @RequestMapping(value = "auth/workbench/{projectid}/workspace/add", method = RequestMethod.GET) ModelAndView addWorkSpaceRequestForm(@PathVariable("projectid") String projectid); @AccessPolicies({ @ElementAccessPolicy(type = CheckedElementType.PROJECT, paramIndex = 3, userRole = { RoleNames.ROLE_COLLABORATOR_OWNER, RoleNames.ROLE_PROJ_COLLABORATOR_ADMIN, RoleNames.ROLE_PROJ_COLLABORATOR_CONTRIBUTOR }) }) @RequestMapping(value = "auth/workbench/{projectid}/workspace/add", method = RequestMethod.POST) String addWorkSpaceRequest(@Validated @ModelAttribute("workspace") Workspace workspace,
            BindingResult result, @PathVariable("projectid") String projectid, Model model, Principal principal,
            RedirectAttributes redirectAttrs, Locale locale);  }
@Test @Ignore public void testAddWorkSpaceRequest() { fail("Not yet implemented"); }