WANG 6 年之前
父节点
当前提交
5a772edeff

+ 3 - 17
src/main/java/cn/com/qmth/examcloud/web/security/RequestPermissionInterceptor.java

@@ -27,7 +27,7 @@ import cn.com.qmth.examcloud.web.support.StatusResponse;
  * @date 2018年5月22日
  * @Copyright (c) 2018-? http://qmth.com.cn All Rights Reserved.
  */
-public abstract class RequestPermissionInterceptor implements HandlerInterceptor {
+public class RequestPermissionInterceptor implements HandlerInterceptor {
 
 	private static final ExamCloudLog LOG = ExamCloudLogFactory
 			.getLog(RequestPermissionInterceptor.class);
@@ -39,25 +39,15 @@ public abstract class RequestPermissionInterceptor implements HandlerInterceptor
 
 	private RedisClient redisClient;
 
-	/**
-	 * 判断是否有请求权限
-	 *
-	 * @author WANGWEI
-	 * @param mappingPath
-	 * @param user
-	 * @return
-	 */
-	public abstract boolean hasPermission(String mappingPath, User user);
-
 	/**
 	 * 构造函数
 	 *
 	 * @param redisClient
 	 * @param exclusions
 	 */
-	public RequestPermissionInterceptor(RedisClient redisClient) {
+	public RequestPermissionInterceptor(ResourceManager resourceManager) {
 		super();
-		this.redisClient = redisClient;
+		this.resourceManager = resourceManager;
 	}
 
 	@Override
@@ -158,8 +148,4 @@ public abstract class RequestPermissionInterceptor implements HandlerInterceptor
 		LOG.debug("afterCompletion... ...");
 	}
 
-	public void setResourceManager(ResourceManager resourceManager) {
-		this.resourceManager = resourceManager;
-	}
-
 }

+ 2 - 2
src/main/java/cn/com/qmth/examcloud/web/security/SpringCloudInterceptor.java → src/main/java/cn/com/qmth/examcloud/web/security/RpcInterceptor.java

@@ -28,10 +28,10 @@ import cn.com.qmth.examcloud.web.support.StatusResponse;
  * @date 2018年5月22日
  * @Copyright (c) 2018-? http://qmth.com.cn All Rights Reserved.
  */
-public final class SpringCloudInterceptor implements HandlerInterceptor {
+public final class RpcInterceptor implements HandlerInterceptor {
 
 	private static final ExamCloudLog LOG = ExamCloudLogFactory
-			.getLog(SpringCloudInterceptor.class);
+			.getLog(RpcInterceptor.class);
 
 	private ResourceManager resourceManager;