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