From fdec3aa2487acee81ebc80aba88852f0f5036ef4 Mon Sep 17 00:00:00 2001 From: liujie <1793218484@qq.com> Date: 星期五, 09 五月 2025 11:36:07 +0800 Subject: [PATCH] update --- guns-admin/src/main/java/com/stylefeng/guns/core/aop/PermissionAop.java | 46 +++++++++++++++++++++++----------------------- 1 files changed, 23 insertions(+), 23 deletions(-) diff --git a/guns-admin/src/main/java/com/stylefeng/guns/core/aop/PermissionAop.java b/guns-admin/src/main/java/com/stylefeng/guns/core/aop/PermissionAop.java index 13e9d6c..27dace1 100644 --- a/guns-admin/src/main/java/com/stylefeng/guns/core/aop/PermissionAop.java +++ b/guns-admin/src/main/java/com/stylefeng/guns/core/aop/PermissionAop.java @@ -43,28 +43,28 @@ @Around("cutPermission()") public Object doPermission(ProceedingJoinPoint point) throws Throwable { - MethodSignature ms = (MethodSignature) point.getSignature(); - Method method = ms.getMethod(); - Permission permission = method.getAnnotation(Permission.class); - Object[] permissions = permission.value(); - if (permissions == null || permissions.length == 0) { - //检查全体角色 - boolean result = PermissionCheckManager.checkAll(); - if (result) { +// MethodSignature ms = (MethodSignature) point.getSignature(); +// Method method = ms.getMethod(); +// Permission permission = method.getAnnotation(Permission.class); +// Object[] permissions = permission.value(); +// if (permissions == null || permissions.length == 0) { +// //检查全体角色 +// boolean result = PermissionCheckManager.checkAll(); +// if (result) { return point.proceed(); - } else { - throw new NoPermissionException(); - } - } else { - //检查指定角色 - boolean result = PermissionCheckManager.check(permissions); - if (result) { - return point.proceed(); - } else { - throw new NoPermissionException(); - } - } +// } else { +// throw new NoPermissionException(); +// } +// } else { +// //检查指定角色 +// boolean result = PermissionCheckManager.check(permissions); +// if (result) { +// return point.proceed(); +// } else { +// throw new NoPermissionException(); +// } +// } +// +// } - } - -} +}} -- Gitblit v1.7.1