mirror of
https://github.com/PlayEdu/PlayEdu
synced 2025-12-25 20:35:35 +08:00
added: 数据权限
This commit is contained in:
@@ -33,6 +33,9 @@ public class AdminAuthMiddleware implements HandlerInterceptor {
|
||||
@Autowired
|
||||
private AppBus appBus;
|
||||
|
||||
@Autowired
|
||||
private BackendBus backendBus;
|
||||
|
||||
@Override
|
||||
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
|
||||
if ("OPTIONS".equals(request.getMethod()) || BackendBus.inUnAuthWhitelist(request.getRequestURI())) {
|
||||
@@ -57,6 +60,7 @@ public class AdminAuthMiddleware implements HandlerInterceptor {
|
||||
|
||||
PlayEduBackendThreadLocal.setAdminUserId(payload.getSub());
|
||||
PlayEduBackendThreadLocal.setAdminUser(adminUser);
|
||||
PlayEduBackendThreadLocal.setAdminPer(backendBus.adminUserPermissions(adminUser.getId()));
|
||||
|
||||
return HandlerInterceptor.super.preHandle(request, response, handler);
|
||||
} catch (Exception e) {
|
||||
|
||||
Reference in New Issue
Block a user