add:开发模式不做身份验证
This commit is contained in:
parent
39d4edebae
commit
e17095cc7e
@ -46,6 +46,7 @@ public class RoleAccessDecisionManager implements AccessDecisionManager {
|
||||
return;
|
||||
}
|
||||
if("dev".equals(ConfigTools.load(ConfigTools.CONFIG, "model"))) {
|
||||
authentication.setAuthenticated(true);
|
||||
return;
|
||||
}
|
||||
if(url.endsWith(".ts")||url.endsWith(".m3u8")){
|
||||
|
@ -434,6 +434,9 @@ public class Tools {
|
||||
}
|
||||
|
||||
public static String getLoginUser() {
|
||||
if("dev".equals(ConfigTools.load(ConfigTools.CONFIG, "model"))) {
|
||||
return "admin";
|
||||
}
|
||||
Object user = SecurityContextHolder.getContext().getAuthentication().getPrincipal();
|
||||
if (user instanceof String) {
|
||||
return (String) user;
|
||||
|
Loading…
Reference in New Issue
Block a user