diff options
author | Georg Pfuetzenreuter | 2022-05-08 04:21:35 +0200 |
---|---|---|
committer | Georg Pfuetzenreuter | 2022-05-08 04:21:35 +0200 |
commit | cbec25cd6b5fe37f3010ab163b1bca61a743c457 (patch) | |
tree | 0be07889aa04b3ce710ab9c247308fba0b8b9ec4 /src/main/java | |
parent | f105d0e1ab01fca7a04f54a8cacf6372a5b2d6c0 (diff) | |
download | pubsh-web-cbec25cd6b5fe37f3010ab163b1bca61a743c457.tar.gz pubsh-web-cbec25cd6b5fe37f3010ab163b1bca61a743c457.tar.bz2 pubsh-web-cbec25cd6b5fe37f3010ab163b1bca61a743c457.zip |
User -> portal, Admin -> admin
Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/net/libertacasa/pubsh/web/SecurityConfig.java | 1 | ||||
-rw-r--r-- | src/main/java/net/libertacasa/pubsh/web/WebApplication.java | 8 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/main/java/net/libertacasa/pubsh/web/SecurityConfig.java b/src/main/java/net/libertacasa/pubsh/web/SecurityConfig.java index 53f83ab..14b6dcb 100644 --- a/src/main/java/net/libertacasa/pubsh/web/SecurityConfig.java +++ b/src/main/java/net/libertacasa/pubsh/web/SecurityConfig.java @@ -36,6 +36,7 @@ public class SecurityConfig extends KeycloakWebSecurityConfigurerAdapter { http .authorizeRequests() .antMatchers("/portal").hasAuthority("devel-user") + .antMatchers("/admin").hasAuthority("devel-admins") .anyRequest().permitAll(); } } diff --git a/src/main/java/net/libertacasa/pubsh/web/WebApplication.java b/src/main/java/net/libertacasa/pubsh/web/WebApplication.java index d4094f6..ad9ed9b 100644 --- a/src/main/java/net/libertacasa/pubsh/web/WebApplication.java +++ b/src/main/java/net/libertacasa/pubsh/web/WebApplication.java @@ -45,7 +45,7 @@ public class WebApplication { } - @GetMapping("/portal") + @GetMapping("/admin") public String portal(Model model) throws pubshError { KeycloakAuthenticationToken authentication = (KeycloakAuthenticationToken) SecurityContextHolder.getContext().getAuthentication(); @@ -101,10 +101,10 @@ public class WebApplication { model.addAttribute("availableOs", availableOs); //model.addAttribute("osChoice", new String()); - return("portal"); + return("admin"); } - @GetMapping("/user") + @GetMapping("/portal") public String user(Model model) throws pubshError { KeycloakAuthenticationToken authentication = (KeycloakAuthenticationToken) SecurityContextHolder.getContext().getAuthentication(); @@ -146,7 +146,7 @@ public class WebApplication { model.addAttribute("docker_containers", containers); model.addAttribute("availableOs", availableOs); - return("user"); + return("portal"); } @DeleteMapping("/frontend/container/delete/{id}") |