Allow empty zone in credentials

This commit is contained in:
terry-xiaoyu 2019-03-16 12:25:39 +08:00
parent 02fe8560e2
commit a7adb79f17
1 changed files with 2 additions and 2 deletions

View File

@ -61,8 +61,8 @@ do_check_acl(#{zone := Zone} = Credentials, PubSub, Topic) ->
reload_acl() -> reload_acl() ->
emqx_mod_acl_internal:reload_acl(). emqx_mod_acl_internal:reload_acl().
init_result(#{zone := Zone}) -> init_result(Credentials) ->
case emqx_zone:get_env(Zone, allow_anonymous, false) of case emqx_zone:get_env(maps:get(zone, Credentials, undefined), allow_anonymous, false) of
true -> success; true -> success;
false -> not_authorized false -> not_authorized
end. end.