mirror of
https://github.com/imgfloat/server.git
synced 2026-02-05 03:39:26 +00:00
Add terms and policies
This commit is contained in:
@@ -59,7 +59,10 @@ public class SecurityConfig {
|
||||
"/v3/api-docs/**",
|
||||
"/swagger-ui.html",
|
||||
"/swagger-ui/**",
|
||||
"/channels"
|
||||
"/channels",
|
||||
"/terms",
|
||||
"/privacy",
|
||||
"/cookies"
|
||||
)
|
||||
.permitAll()
|
||||
.requestMatchers(HttpMethod.GET, "/view/*/broadcast")
|
||||
|
||||
@@ -76,6 +76,27 @@ public class ViewController {
|
||||
return "channels";
|
||||
}
|
||||
|
||||
@org.springframework.web.bind.annotation.GetMapping("/terms")
|
||||
public String termsOfUse(Model model) {
|
||||
LOG.info("Rendering terms of use");
|
||||
addVersionAttributes(model);
|
||||
return "terms";
|
||||
}
|
||||
|
||||
@org.springframework.web.bind.annotation.GetMapping("/privacy")
|
||||
public String privacyPolicy(Model model) {
|
||||
LOG.info("Rendering privacy policy");
|
||||
addVersionAttributes(model);
|
||||
return "privacy";
|
||||
}
|
||||
|
||||
@org.springframework.web.bind.annotation.GetMapping("/cookies")
|
||||
public String cookiePolicy(Model model) {
|
||||
LOG.info("Rendering cookie policy");
|
||||
addVersionAttributes(model);
|
||||
return "cookies";
|
||||
}
|
||||
|
||||
@org.springframework.web.bind.annotation.GetMapping("/settings")
|
||||
public String settingsView(OAuth2AuthenticationToken oauthToken, Model model) {
|
||||
String sessionUsername = OauthSessionUser.from(oauthToken).login();
|
||||
|
||||
Reference in New Issue
Block a user