fix: check authn(lazy type) config when boot

This commit is contained in:
Zhongwen Deng 2022-09-08 14:27:50 +08:00
parent 0b07561e9b
commit 49829caaa0
2 changed files with 3 additions and 3 deletions

View File

@ -414,9 +414,8 @@ check_config(SchemaMod, RawConf) ->
check_config(SchemaMod, RawConf, Opts0) -> check_config(SchemaMod, RawConf, Opts0) ->
Opts1 = #{ Opts1 = #{
return_plain => true, return_plain => true,
%% TODO: evil, remove, required should be declared in schema format => map,
required => false, check_lazy => true
format => map
}, },
Opts = maps:merge(Opts0, Opts1), Opts = maps:merge(Opts0, Opts1),
{AppEnvs, CheckedConf} = {AppEnvs, CheckedConf} =

View File

@ -2245,6 +2245,7 @@ validate_alarm_actions(Actions) ->
Error -> {error, Error} Error -> {error, Error}
end. end.
parse_user_lookup_fun({Fun, _} = Lookup) when is_function(Fun, 3) -> Lookup;
parse_user_lookup_fun(StrConf) -> parse_user_lookup_fun(StrConf) ->
[ModStr, FunStr] = string:tokens(str(StrConf), ": "), [ModStr, FunStr] = string:tokens(str(StrConf), ": "),
Mod = list_to_atom(ModStr), Mod = list_to_atom(ModStr),