editor public fix

This commit is contained in:
Michael Wain 2024-07-08 04:12:21 +03:00
parent 8adfb9f289
commit c68a35ef82
2 changed files with 7 additions and 0 deletions

View File

@ -193,6 +193,12 @@ public class PanelController {
return "script-editor";
}
@GetMapping("/editor-public")
public String scriptEditorPublic(Model model, @RequestHeader("User-Agent") String uagent, @RequestHeader("Accept") String accepth) {
model.addAttribute("is_mobile", new UAgentInfo(uagent, accepth).detectSmartphone());
return "editor-public";
}
@Getter
@Setter
@NoArgsConstructor

View File

@ -39,6 +39,7 @@ public class SpringSecurity {
.requestMatchers("/signup/**").permitAll()
.requestMatchers("/").permitAll()
.requestMatchers("/script-editor").hasAnyAuthority("ROLE_ADMIN")
.requestMatchers("/editor-public").permitAll()
).formLogin(
form -> form
.loginPage("/login")