fix(authz): fix authz result logs

prior to this fix, it's always the default authz result logged at
warning level
This commit is contained in:
Zaiming (Stone) Shi 2024-01-16 14:40:53 +01:00
parent b6d0365027
commit 541525c50f
1 changed files with 1 additions and 1 deletions

View File

@ -153,7 +153,7 @@ do_authorize(ClientInfo, Action, Topic) ->
case run_hooks('client.authorize', [ClientInfo, Action, Topic], Default) of
AuthzResult = #{result := Result} when Result == allow; Result == deny ->
From = maps:get(from, AuthzResult, unknown),
ok = log_result(ClientInfo, Topic, Action, From, NoMatch),
ok = log_result(ClientInfo, Topic, Action, From, Result),
emqx_hooks:run(
'client.check_authz_complete',
[ClientInfo, Action, Topic, Result, From]