refactor: 通过注解来拦截资源和项目的归属关系

This commit is contained in:
CaptainB 2023-12-13 14:44:16 +08:00
parent edf466ad35
commit 0adb7ab821
1 changed files with 29 additions and 34 deletions

View File

@ -3,7 +3,6 @@ package io.metersphere.system.security;
import io.metersphere.sdk.constants.InternalUserRole;
import io.metersphere.sdk.exception.MSException;
import io.metersphere.sdk.util.LogUtils;
import io.metersphere.sdk.util.Translator;
import io.metersphere.system.mapper.ExtCheckOwnerMapper;
import io.metersphere.system.utils.SessionUtils;
@ -41,7 +40,6 @@ public class CheckOwnerAspect {
@Before("pointcut()")
public void before(JoinPoint joinPoint) {
try {
//从切面织入点处通过反射机制获取织入点处的方法
MethodSignature signature = (MethodSignature) joinPoint.getSignature();
//获取切入点所在的方法
@ -74,9 +72,6 @@ public class CheckOwnerAspect {
throw new MSException(Translator.get("check_owner_case"));
}
}
} catch (Exception e) {
LogUtils.error(e.getMessage(), e);
}
}
}