|
@@ -39,7 +39,8 @@ public class NginxConfigController {
|
|
@PostMapping("/update")
|
|
@PostMapping("/update")
|
|
public Object update(@RequestAttribute AdminSession adminSession, @RequestParam Long appId,
|
|
public Object update(@RequestAttribute AdminSession adminSession, @RequestParam Long appId,
|
|
@RequestParam Long envId, @RequestParam(required = false) Long moduleId, @RequestParam String content) {
|
|
@RequestParam Long envId, @RequestParam(required = false) Long moduleId, @RequestParam String content) {
|
|
- adminSession.validateRole(Role.OPS, Role.ADMIN);
|
|
|
|
|
|
+ adminSession.validateRole(Role.DEV, Role.OPS, Role.ADMIN);
|
|
|
|
+ adminSession.validateApp(appService.getById(appId));
|
|
return nginxConfigService.update(appService.getById(appId), envService.getById(envId),
|
|
return nginxConfigService.update(appService.getById(appId), envService.getById(envId),
|
|
moduleId != null ? moduleService.getById(moduleId) : null, content);
|
|
moduleId != null ? moduleService.getById(moduleId) : null, content);
|
|
}
|
|
}
|