mirror of
https://github.com/hs-web/hsweb-framework.git
synced 2026-06-04 20:03:22 +08:00
优化权限解析逻辑
This commit is contained in:
@@ -16,6 +16,7 @@ import java.lang.reflect.Method;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
/**
|
||||
@@ -48,10 +49,13 @@ public class DefaultAopMethodAuthorizeDefinitionParser implements AopMethodAutho
|
||||
if (!CollectionUtils.isEmpty(parserCustomers)) {
|
||||
definition = parserCustomers.stream()
|
||||
.map(customer -> customer.parse(paramContext))
|
||||
.filter(Objects::nonNull)
|
||||
.findAny().orElse(null);
|
||||
if (definition != null) {
|
||||
if(definition instanceof EmptyAuthorizeDefinition)return null;
|
||||
return definition;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Authorize classAuth = AopUtils.findAnnotation(paramContext.getTarget().getClass(), Authorize.class);
|
||||
|
||||
Reference in New Issue
Block a user