|
@@ -62,15 +62,6 @@ public class RepoAuthPageController {
|
|
|
return "/devops/build/repoauth/add";
|
|
return "/devops/build/repoauth/add";
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- @ApiOperation(value = "仓库认证编辑页面", notes = "N")
|
|
|
|
|
- @PreAuthorize("hasRole('ROLE_ADMIN')")
|
|
|
|
|
- @GetMapping("/repoauth/edit/{id}")
|
|
|
|
|
- public String editRepoAuthPage(@PathVariable("id") RepoAuthConfig repoAuth, Model model) {
|
|
|
|
|
- repoAuth.setNull();
|
|
|
|
|
- model.addAttribute("repoAuth", repoAuth);
|
|
|
|
|
- return "/devops/build/repoauth/edit";
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
private void setRepoAuthModel(Model model) {
|
|
private void setRepoAuthModel(Model model) {
|
|
|
List<KeyValue> repos = new ArrayList<>();
|
|
List<KeyValue> repos = new ArrayList<>();
|
|
|
for (RepoType repoType : RepoType.values()) {
|
|
for (RepoType repoType : RepoType.values()) {
|
|
@@ -86,16 +77,7 @@ public class RepoAuthPageController {
|
|
|
model.addAttribute("auths", auths);
|
|
model.addAttribute("auths", auths);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- @ApiOperation(value = "仓库认证详情页面", notes = "N")
|
|
|
|
|
- @PreAuthorize("hasRole('ROLE_ADMIN')")
|
|
|
|
|
- @GetMapping("/repoauth/detail/{id}")
|
|
|
|
|
- public String repoAuthDetailPage(@PathVariable("id") RepoAuthConfig repoAuth, Model model) {
|
|
|
|
|
- repoAuth.setPassword("******");
|
|
|
|
|
- model.addAttribute("repoAuth", repoAuth);
|
|
|
|
|
- return "/devops/build/repoauth/detail";
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- @ApiOperation(value = "添加/修改仓库认证配置", notes = "N")
|
|
|
|
|
|
|
+ @ApiOperation(value = "添加仓库认证配置", notes = "N")
|
|
|
@PreAuthorize("hasRole('ROLE_ADMIN')")
|
|
@PreAuthorize("hasRole('ROLE_ADMIN')")
|
|
|
@PostMapping(value = "/repoauth", produces = MediaType.APPLICATION_JSON_VALUE)
|
|
@PostMapping(value = "/repoauth", produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
@ResponseBody
|
|
@ResponseBody
|