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:
parent
b6d0365027
commit
541525c50f
|
@ -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]
|
||||
|
|
Loading…
Reference in New Issue