fix(authz api): fix 404 error when no have "all" rules
This commit is contained in:
parent
bd00c7d3c7
commit
7c28a3f6c1
|
@ -614,7 +614,8 @@ client(delete, #{bindings := #{clientid := Clientid}}) ->
|
|||
|
||||
all(get, _) ->
|
||||
case mnesia:dirty_read(?ACL_TABLE, ?ACL_TABLE_ALL) of
|
||||
[] -> {404, #{code => <<"NOT_FOUND">>, message => <<"Not Found">>}};
|
||||
[] ->
|
||||
{200, #{rules => []}};
|
||||
[#emqx_acl{who = ?ACL_TABLE_ALL, rules = Rules}] ->
|
||||
{200, #{rules => [ #{topic => Topic,
|
||||
action => Action,
|
||||
|
|
Loading…
Reference in New Issue