@Override
    public PermissionMenuVO getPermissionMenu(final String namespaceId) {
        UserInfo userInfo = JwtUtils.getUserInfo();
        if (Objects.isNull(userInfo)) {
            return null;
        }
        String selectedNamespaceId = namespaceId;
        if (StringUtils.isBlank(namespaceId)) {
            selectedNamespaceId = Constants.SYS_DEFAULT_NAMESPACE_ID;
        }
        List<NamespacePluginVO> pluginList = namespacePluginService.listByNamespaceId(selectedNamespaceId);
        
        if (CollectionUtils.isEmpty(pluginList)) {
            
            List<ResourceVO> resourceVOList = getResourceListByUserNameAndPluginNames(userInfo.getUserName(), Collections.emptySet());
            if (CollectionUtils.isEmpty(resourceVOList)) {
                return null;
            }
            return new PermissionMenuVO(ResourceUtil.buildMenu(resourceVOList), getAuthPerm(resourceVOList), getAllAuthPerms());
        }
        
        Set<String> pluginNameSet = pluginList.stream()
                .map(NamespacePluginVO::getName)
                .collect(Collectors.toSet());
        
        List<ResourceVO> resourceVOList = getResourceListByUserNameAndPluginNames(userInfo.getUserName(), pluginNameSet);
        if (CollectionUtils.isEmpty(resourceVOList)) {
            return null;
        }
        return new PermissionMenuVO(ResourceUtil.buildMenu(resourceVOList), getAuthPerm(resourceVOList), getAllAuthPerms());
    }
get user permission menu by token.

@param namespaceId namespace id.
@return {@linkplain PermissionMenuVO}
shenyu-admin/src/main/java/org/apache/shenyu/admin/service/impl/PermissionServiceImpl.java