chore(authz): update apps vsn
This commit is contained in:
parent
f92b8bb7fb
commit
f733293a8b
|
@ -1,6 +1,6 @@
|
|||
{application, emqx_authz,
|
||||
[{description, "An OTP application"},
|
||||
{vsn, "0.1.0"},
|
||||
{vsn, "0.1.1"},
|
||||
{registered, []},
|
||||
{mod, {emqx_authz_app, []}},
|
||||
{applications,
|
||||
|
|
|
@ -50,8 +50,7 @@ authorize(Client, PubSub, Topic,
|
|||
do_authorize(_Client, _PubSub, _Topic, []) ->
|
||||
nomatch;
|
||||
do_authorize(Client, PubSub, Topic, [Rule | Tail]) ->
|
||||
case match(Client, PubSub, Topic, Rule)
|
||||
of
|
||||
case match(Client, PubSub, Topic, Rule) of
|
||||
{matched, Permission} -> {matched, Permission};
|
||||
nomatch -> do_authorize(Client, PubSub, Topic, Tail)
|
||||
end.
|
||||
|
|
|
@ -47,9 +47,9 @@ set_special_configs(emqx) ->
|
|||
emqx_ct_helpers:deps_path(emqx, "test/loaded_plguins")),
|
||||
ok;
|
||||
set_special_configs(emqx_authz) ->
|
||||
Rules = [#{config =>#{<<"meck">> => <<"fake">>},
|
||||
Rules = [#{config =>#{},
|
||||
principal => all,
|
||||
sql => <<"fake sql">>,
|
||||
sql => <<"fake">>,
|
||||
type => mysql}
|
||||
],
|
||||
emqx_config:put([emqx_authz], #{rules => Rules}),
|
||||
|
@ -76,18 +76,15 @@ set_special_configs(_App) ->
|
|||
t_authz(_) ->
|
||||
ClientInfo1 = #{clientid => <<"test">>,
|
||||
username => <<"test">>,
|
||||
peerhost => {127,0,0,1},
|
||||
zone => zone
|
||||
peerhost => {127,0,0,1}
|
||||
},
|
||||
ClientInfo2 = #{clientid => <<"test_clientid">>,
|
||||
username => <<"test_username">>,
|
||||
peerhost => {192,168,0,10},
|
||||
zone => zone
|
||||
peerhost => {192,168,0,10}
|
||||
},
|
||||
ClientInfo3 = #{clientid => <<"test_clientid">>,
|
||||
username => <<"fake_username">>,
|
||||
peerhost => {127,0,0,1},
|
||||
zone => zone
|
||||
peerhost => {127,0,0,1}
|
||||
},
|
||||
|
||||
meck:expect(emqx_resource, query, fun(_, _) -> {ok, ?COLUMNS, []} end),
|
||||
|
|
|
@ -47,9 +47,9 @@ set_special_configs(emqx) ->
|
|||
emqx_ct_helpers:deps_path(emqx, "test/loaded_plguins")),
|
||||
ok;
|
||||
set_special_configs(emqx_authz) ->
|
||||
Rules = [#{config =>#{<<"meck">> => <<"fake">>},
|
||||
Rules = [#{config =>#{},
|
||||
principal => all,
|
||||
sql => <<"fake sql">>,
|
||||
sql => <<"fake">>,
|
||||
type => pgsql}
|
||||
],
|
||||
emqx_config:put([emqx_authz], #{rules => Rules}),
|
||||
|
@ -76,18 +76,15 @@ set_special_configs(_App) ->
|
|||
t_authz(_) ->
|
||||
ClientInfo1 = #{clientid => <<"test">>,
|
||||
username => <<"test">>,
|
||||
peerhost => {127,0,0,1},
|
||||
zone => zone
|
||||
peerhost => {127,0,0,1}
|
||||
},
|
||||
ClientInfo2 = #{clientid => <<"test_clientid">>,
|
||||
username => <<"test_username">>,
|
||||
peerhost => {192,168,0,10},
|
||||
zone => zone
|
||||
peerhost => {192,168,0,10}
|
||||
},
|
||||
ClientInfo3 = #{clientid => <<"test_clientid">>,
|
||||
username => <<"fake_username">>,
|
||||
peerhost => {127,0,0,1},
|
||||
zone => zone
|
||||
peerhost => {127,0,0,1}
|
||||
},
|
||||
|
||||
meck:expect(emqx_resource, query, fun(_, _) -> {ok, ?COLUMNS, []} end),
|
||||
|
|
|
@ -47,9 +47,9 @@ set_special_configs(emqx) ->
|
|||
emqx_ct_helpers:deps_path(emqx, "test/loaded_plguins")),
|
||||
ok;
|
||||
set_special_configs(emqx_authz) ->
|
||||
Rules = [#{config =>#{<<"meck">> => <<"fake">>},
|
||||
Rules = [#{config =>#{},
|
||||
principal => all,
|
||||
cmd => <<"fake cmd">>,
|
||||
cmd => <<"fake">>,
|
||||
type => redis}
|
||||
],
|
||||
emqx_config:put([emqx_authz], #{rules => Rules}),
|
||||
|
@ -68,8 +68,7 @@ set_special_configs(_App) ->
|
|||
t_authz(_) ->
|
||||
ClientInfo = #{clientid => <<"clientid">>,
|
||||
username => <<"username">>,
|
||||
peerhost => {127,0,0,1},
|
||||
zone => zone
|
||||
peerhost => {127,0,0,1}
|
||||
},
|
||||
|
||||
meck:expect(emqx_resource, query, fun(_, _) -> {ok, []} end),
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{application, emqx_connector,
|
||||
[{description, "An OTP application"},
|
||||
{vsn, "0.1.0"},
|
||||
{vsn, "0.1.1"},
|
||||
{registered, []},
|
||||
{mod, {emqx_connector_app, []}},
|
||||
{applications,
|
||||
|
|
Loading…
Reference in New Issue