Merge remote-tracking branch 'origin/develop'
This commit is contained in:
commit
ff0fd66725
|
@ -863,7 +863,7 @@ check_sub_acl(TopicFilters, #pstate{credentials = #{is_superuser := IsSuper}, en
|
||||||
check_sub_acl(TopicFilters, #pstate{credentials = Credentials}) ->
|
check_sub_acl(TopicFilters, #pstate{credentials = Credentials}) ->
|
||||||
lists:foldr(
|
lists:foldr(
|
||||||
fun({Topic, SubOpts}, {Ok, Acc}) ->
|
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]};
|
allow -> {Ok, [{Topic, SubOpts}|Acc]};
|
||||||
deny ->
|
deny ->
|
||||||
{error, [{Topic, SubOpts#{rc := ?RC_NOT_AUTHORIZED}}|Acc]}
|
{error, [{Topic, SubOpts#{rc := ?RC_NOT_AUTHORIZED}}|Acc]}
|
||||||
|
|
|
@ -104,8 +104,6 @@ manual_start_stop_test() ->
|
||||||
%% call ensure_started again should yeld the same result
|
%% call ensure_started again should yeld the same result
|
||||||
{ok, Pid} = emqx_bridge:ensure_started(?BRIDGE_NAME, Config),
|
{ok, Pid} = emqx_bridge:ensure_started(?BRIDGE_NAME, Config),
|
||||||
?assertEqual(Pid, whereis(?BRIDGE_REG_NAME)),
|
?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(unknown),
|
||||||
emqx_bridge:ensure_stopped(Pid),
|
emqx_bridge:ensure_stopped(Pid),
|
||||||
emqx_bridge:ensure_stopped(?BRIDGE_REG_NAME).
|
emqx_bridge:ensure_stopped(?BRIDGE_REG_NAME).
|
||||||
|
|
Loading…
Reference in New Issue