|
@@ -37,6 +37,8 @@ public class LoginFilter extends AccessControlFilter {
|
|
|
String basePath = httpRequest.getContextPath();// 获取basePath
|
|
String basePath = httpRequest.getContextPath();// 获取basePath
|
|
|
if (uri.startsWith(basePath)) {
|
|
if (uri.startsWith(basePath)) {
|
|
|
uri = uri.replaceAll("^\\" + basePath + "\\/+", "").replaceAll("\\.html$", "");
|
|
uri = uri.replaceAll("^\\" + basePath + "\\/+", "").replaceAll("\\.html$", "");
|
|
|
|
|
+ } else {
|
|
|
|
|
+ uri = uri.replaceAll("^\\", "");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (token != null && uri.startsWith("api/admin/") && token instanceof Admin) {
|
|
if (token != null && uri.startsWith("api/admin/") && token instanceof Admin) {
|
|
@@ -46,11 +48,11 @@ public class LoginFilter extends AccessControlFilter {
|
|
|
if (token != null && uri.startsWith("techservice/") && token instanceof User) {
|
|
if (token != null && uri.startsWith("techservice/") && token instanceof User) {
|
|
|
return Boolean.TRUE;
|
|
return Boolean.TRUE;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
if (token != null && uri.startsWith("api/techproject/") && token instanceof User) {
|
|
if (token != null && uri.startsWith("api/techproject/") && token instanceof User) {
|
|
|
return Boolean.TRUE;
|
|
return Boolean.TRUE;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
if (token != null && uri.startsWith("api/user/") && token instanceof User) {
|
|
if (token != null && uri.startsWith("api/user/") && token instanceof User) {
|
|
|
return Boolean.TRUE;
|
|
return Boolean.TRUE;
|
|
|
}
|
|
}
|