class UserAllowPermissionHandler {

    @Getter
    @Setter
    private Map<String, Map<String, String>> allows = new HashMap<>();

    private final PathMatcher pathMatcher = new AntPathMatcher(".");

    @EventListener
    public void handEvent(AuthorizingHandleBeforeEvent event) {<FILL_FUNCTION_BODY>}

}


        if (allows.isEmpty() || event.getHandleType() == HandleType.DATA) {
            return;
        }
        AuthorizingContext context = event.getContext();

        // class full name.method
        String path = ClassUtils.getUserClass(context.getParamContext()
                .getTarget())
                .getName().concat(".")
                .concat(context.getParamContext()
                        .getMethod().getName());

        AtomicBoolean allow = new AtomicBoolean();
        for (Map.Entry<String, Map<String, String>> entry : allows.entrySet()) {
            String dimension = entry.getKey();
            if ("user".equals(dimension)) {
                String userId = context.getAuthentication().getUser().getId();
                allow.set(Optional.ofNullable(entry.getValue().get(userId))
                        .filter(pattern -> "*".equals(pattern) || pathMatcher.match(pattern, path))
                        .isPresent());
            } else { //其他维度
                for (Map.Entry<String, String> confEntry : entry.getValue().entrySet()) {
                    context.getAuthentication()
                            .getDimension(dimension, confEntry.getKey())
                            .ifPresent(dim -> {
                                String pattern = confEntry.getValue();
                                allow.set("*".equals(pattern) || pathMatcher.match(confEntry.getValue(), path));
                            });
                }
            }
            if (allow.get()) {
                event.setAllow(true);
                return;
            }
        }

    
<no_super_class>