public AclConfig getAclConfig()

in src/main/java/org/apache/rocketmq/dashboard/service/impl/AclServiceImpl.java [55:78]


    public AclConfig getAclConfig(boolean excludeSecretKey) {
        try {
            Optional<String> addr = getMasterSet().stream().findFirst();
            if (addr.isPresent()) {
                if (!excludeSecretKey) {
                    return mqAdminExt.examineBrokerClusterAclConfig(addr.get());
                } else {
                    AclConfig aclConfig = mqAdminExt.examineBrokerClusterAclConfig(addr.get());
                    if (CollectionUtils.isNotEmpty(aclConfig.getPlainAccessConfigs())) {
                        aclConfig.getPlainAccessConfigs().forEach(pac -> pac.setSecretKey(null));
                    }
                    return aclConfig;
                }
            }
        } catch (Exception e) {
            log.error("getAclConfig error.", e);
            Throwables.throwIfUnchecked(e);
            throw new RuntimeException(e);
        }
        AclConfig aclConfig = new AclConfig();
        aclConfig.setGlobalWhiteAddrs(Collections.emptyList());
        aclConfig.setPlainAccessConfigs(Collections.emptyList());
        return aclConfig;
    }