Merge remote-tracking branch 'origin/develop'

This commit is contained in:
zhanghongtong 2019-03-29 04:21:45 +08:00
commit ff0fd66725
2 changed files with 1 additions and 3 deletions

View File

@ -863,7 +863,7 @@ check_sub_acl(TopicFilters, #pstate{credentials = #{is_superuser := IsSuper}, en
check_sub_acl(TopicFilters, #pstate{credentials = Credentials}) ->
lists:foldr(
fun({Topic, SubOpts}, {Ok, Acc}) ->
case emqx_access_control:check_acl(Credentials, publish, Topic) of
case emqx_access_control:check_acl(Credentials, subscribe, Topic) of
allow -> {Ok, [{Topic, SubOpts}|Acc]};
deny ->
{error, [{Topic, SubOpts#{rc := ?RC_NOT_AUTHORIZED}}|Acc]}

View File

@ -104,8 +104,6 @@ manual_start_stop_test() ->
%% call ensure_started again should yeld the same result
{ok, Pid} = emqx_bridge:ensure_started(?BRIDGE_NAME, Config),
?assertEqual(Pid, whereis(?BRIDGE_REG_NAME)),
?assertEqual({error, standing_by},
emqx_bridge:ensure_forward_present(Pid, "dummy")),
emqx_bridge:ensure_stopped(unknown),
emqx_bridge:ensure_stopped(Pid),
emqx_bridge:ensure_stopped(?BRIDGE_REG_NAME).