Skip to content

Commit

Permalink
fix(acl): the do_check_acl function matches incorrectly
Browse files Browse the repository at this point in the history
  • Loading branch information
Rory-Z authored and turtleDeng committed May 8, 2020
1 parent 892c9dc commit 5c4d3d6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/emqx_acl_mnesia.erl
Expand Up @@ -57,15 +57,15 @@ description() -> "Acl with Mnesia".
do_check_acl(Login, PubSub, Topic, _NoMatchAction) ->
case emqx_auth_mnesia_cli:lookup_acl(Login) of
[] -> ok;
{error, Reason} ->
?LOG(error, "[Mnesia] do_check_acl error: ~p~n", [Reason]),
ok;
UserAcl ->
case match(PubSub, Topic, UserAcl) of
allow -> {stop, allow};
deny -> {stop, deny};
_ -> ok
end;
{error, Reason} ->
?LOG(error, "[Mnesia] do_check_acl error: ~p~n", [Reason]),
ok
end
end.

match(_PubSub, _Topic, []) ->
Expand Down

0 comments on commit 5c4d3d6

Please sign in to comment.