Unverified 提交 39af270c authored 作者: fit2cloud-chenyw's avatar fit2cloud-chenyw 提交者: GitHub

Merge pull request #1946 from dataease/pr@dev@fix_api_proxy_stack

fix: api权限aop隐藏真实堆栈信息
...@@ -18,6 +18,7 @@ import io.dataease.auth.annotation.DePermissionProxy; ...@@ -18,6 +18,7 @@ import io.dataease.auth.annotation.DePermissionProxy;
import io.dataease.commons.utils.AuthUtils; import io.dataease.commons.utils.AuthUtils;
import io.dataease.commons.utils.LogUtil; import io.dataease.commons.utils.LogUtil;
import io.dataease.dto.PermissionProxy; import io.dataease.dto.PermissionProxy;
import io.dataease.exception.DataEaseException;
@Aspect @Aspect
@Component @Component
...@@ -51,15 +52,18 @@ public class DePermissionProxyHandler { ...@@ -51,15 +52,18 @@ public class DePermissionProxyHandler {
} catch (Throwable throwable) { } catch (Throwable throwable) {
LogUtil.error(throwable.getMessage(), throwable); LogUtil.error(throwable.getMessage(), throwable);
throw new RuntimeException(throwable.getMessage()); /* throw new RuntimeException(throwable.getMessage()); */
DataEaseException.throwException(throwable);
} finally { } finally {
AuthUtils.cleanProxyUser(); AuthUtils.cleanProxyUser();
} }
return null;
} }
private PermissionProxy getProxy(Object arg, DePermissionProxy annotation, int layer) throws Exception { private PermissionProxy getProxy(Object arg, DePermissionProxy annotation, int layer) throws Exception {
if(null == arg) return null; if (null == arg)
return null;
String value = annotation.value(); String value = annotation.value();
Class<?> parameterType = arg.getClass(); Class<?> parameterType = arg.getClass();
if (arg instanceof PermissionProxy) { if (arg instanceof PermissionProxy) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论