Skip to content

Commit

Permalink
πŸ”₯ : deactivate mvc controllers
Browse files Browse the repository at this point in the history
  • Loading branch information
cdubuisson committed Apr 9, 2020
1 parent 7e0e953 commit 85004d5
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ protected void configure(HttpSecurity http) throws Exception {
.antMatchers("/css/**", "/js/**", "/favicon.ico", "/images/**").permitAll()
.antMatchers("/**").authenticated()
.and()
.formLogin().loginPage("/login").successHandler(successHandler).permitAll()
.formLogin().successHandler(successHandler).permitAll()
.and()
.logout().permitAll();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public IndexController(TerraformModuleRepository moduleRepository, StackReposito
this.stackRepository = stackRepository;
}

@GetMapping("/")
// @GetMapping("/")
public String index(Model model, User user, Team userTeam){
long moduleCount = 0;
long runningStackCount = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public void setOAuth2ClientProperties(OAuth2ClientProperties oAuth2ClientPropert
this.oAuth2ClientProperties = oAuth2ClientProperties;
}

@GetMapping("/login")
// @GetMapping("/login")
public String login(Model model) {
if (oAuth2ClientProperties != null) {
model.addAttribute("clients", oAuth2ClientProperties.getRegistration().keySet());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,17 @@ public ModulesMVCController(
this.terraformModuleGitRepository = terraformModuleGitRepository;
}

@GetMapping("/modules")
// @GetMapping("/modules")
public String modulesList(){
return "modules";
}

@GetMapping("/modules/import")
// @GetMapping("/modules/import")
public String importModule() {
return "modules_import";
}

@GetMapping("/modules/{id}")
// @GetMapping("/modules/{id}")
public String module(@PathVariable String id, Model model, User user){
var module = terraformModuleRepository.findById(id).orElseThrow(ModuleNotFoundException::new);
if(!module.isAuthorizedFor(user)){
Expand All @@ -50,7 +50,7 @@ public String module(@PathVariable String id, Model model, User user){
return "module";
}

@GetMapping("/modules/{id}/description")
// @GetMapping("/modules/{id}/description")
public String description(@PathVariable String id, Model model) {
model.addAttribute("module", terraformModuleRepository.findById(id).orElseThrow());
return "module_description";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public SettingsController(Settings settings, SettingsRepository settingsReposito
this.settingsRepository = settingsRepository;
}

@GetMapping("/settings")
// @GetMapping("/settings")
public String settings(Model model){
model.addAttribute("settings", settings);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,18 @@ public StackController(StackRepository stackRepository, StackRunner stackRunner,
this.jobRepository = jobRepository;
}

@GetMapping("/modules/{moduleId}/run")
// @GetMapping("/modules/{moduleId}/run")
public String newStack(@PathVariable String moduleId, Model model) {
model.addAttribute("moduleId", moduleId);
return "new_stack";
}

@GetMapping("/stacks")
// @GetMapping("/stacks")
public String listStacks() {
return "stacks";
}

@GetMapping("/stacks/{stackId}")
// @GetMapping("/stacks/{stackId}")
public String editStack(@PathVariable String stackId, Model model) {
// checking if the stack exists
// TODO throw an exception (404) if not
Expand All @@ -54,7 +54,7 @@ public String editStack(@PathVariable String stackId, Model model) {
return "stack";
}

@GetMapping("/stacks/{stackId}/{jobType}")
// @GetMapping("/stacks/{stackId}/{jobType}")
public String launchJob(@PathVariable String stackId, @PathVariable JobType jobType, Model model, User user) {
// get the stack
var stack = this.stackRepository.findById(stackId).orElseThrow(StackNotFoundException::new);
Expand All @@ -72,7 +72,7 @@ public String launchJob(@PathVariable String stackId, @PathVariable JobType jobT
return "job";
}

@GetMapping("/stacks/{stackId}/jobs/{jobId}")
// @GetMapping("/stacks/{stackId}/jobs/{jobId}")
public String viewJob(@PathVariable String stackId, @PathVariable String jobId, Model model) {
// checking if the stack exists
// TODO throw an exception (404) if not
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
@Secured("ROLE_ADMIN")
public class UsersMVCController {

@GetMapping("/users")
// @GetMapping("/users")
public String users(){
return "users";
}
Expand Down

0 comments on commit 85004d5

Please sign in to comment.