summaryrefslogtreecommitdiffstats
path: root/src/main/java/net/libertacasa/pubsh
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/net/libertacasa/pubsh')
-rw-r--r--src/main/java/net/libertacasa/pubsh/web/SecurityConfig.java1
-rw-r--r--src/main/java/net/libertacasa/pubsh/web/WebApplication.java8
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}")