fix(authz): use binary() type instead of string() for cache.excludes

This commit is contained in:
Zaiming (Stone) Shi 2024-01-18 08:36:55 +01:00
parent 6d6242c27a
commit 85b6a3454c
2 changed files with 2 additions and 2 deletions

View File

@ -56,7 +56,7 @@ drain_k() -> {?MODULE, drain_timestamp}.
-spec is_enabled(emqx_types:topic()) -> boolean(). -spec is_enabled(emqx_types:topic()) -> boolean().
is_enabled(Topic) -> is_enabled(Topic) ->
case emqx:get_config([authorization, cache]) of case emqx:get_config([authorization, cache]) of
#{enable := true, excludes := Filters} -> #{enable := true, excludes := Filters} when Filters =/= [] ->
not is_excluded(Topic, Filters); not is_excluded(Topic, Filters);
#{enable := IsEnabled} -> #{enable := IsEnabled} ->
IsEnabled IsEnabled

View File

@ -468,7 +468,7 @@ fields(authz_cache) ->
} }
)}, )},
{excludes, {excludes,
sc(hoconsc:array(string()), #{ sc(hoconsc:array(binary()), #{
default => [], default => [],
desc => ?DESC(fields_authz_cache_excludes) desc => ?DESC(fields_authz_cache_excludes)
})} })}