Skip to content

Commit

Permalink
Merge pull request #8760 from emqx/bump-vsn
Browse files Browse the repository at this point in the history
Release 5.0.5: bump vsn
  • Loading branch information
HJianBo committed Aug 19, 2022
2 parents 8b4d4f6 + 3874f14 commit 0252325
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion apps/emqx/include/emqx_release.hrl
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
%% `apps/emqx/src/bpapi/README.md'

%% Community edition
-define(EMQX_RELEASE_CE, "5.0.5-beta.1").
-define(EMQX_RELEASE_CE, "5.0.5").

%% Enterprise edition
-define(EMQX_RELEASE_EE, "5.0.0-alpha.1").
Expand Down
2 changes: 1 addition & 1 deletion apps/emqx_dashboard/i18n/emqx_dashboard_i18n.conf
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ its own from which a browser should permit loading resources."""
zh: "多语言支持"
}
}
bootstrap_user_file {
bootstrap_users_file {
desc {
en: "Initialize users file."
zh: "初始化用户文件"
Expand Down
12 changes: 6 additions & 6 deletions apps/emqx_dashboard/src/emqx_dashboard_admin.erl
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
-export([
add_default_user/0,
default_username/0,
add_bootstrap_user/0
add_bootstrap_users/0
]).

-type emqx_admin() :: #?ADMIN{}.
Expand Down Expand Up @@ -85,16 +85,16 @@ mnesia(boot) ->
add_default_user() ->
add_default_user(binenv(default_username), binenv(default_password)).

-spec add_bootstrap_user() -> ok | {error, _}.
add_bootstrap_user() ->
case emqx:get_config([dashboard, bootstrap_user_file], undefined) of
-spec add_bootstrap_users() -> ok | {error, _}.
add_bootstrap_users() ->
case emqx:get_config([dashboard, bootstrap_users_file], undefined) of
undefined ->
ok;
File ->
case mnesia:table_info(?ADMIN, size) of
0 ->
?SLOG(debug, #{msg => "Add dashboard bootstrap users", file => File}),
add_bootstrap_user(File);
add_bootstrap_users(File);
_ ->
ok
end
Expand Down Expand Up @@ -312,7 +312,7 @@ add_default_user(Username, Password) ->
_ -> {ok, default_user_exists}
end.

add_bootstrap_user(File) ->
add_bootstrap_users(File) ->
case file:open(File, [read]) of
{ok, Dev} ->
{ok, MP} = re:compile(<<"(\.+):(\.+$)">>, [ungreedy]),
Expand Down
2 changes: 1 addition & 1 deletion apps/emqx_dashboard/src/emqx_dashboard_app.erl
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ start(_StartType, _StartArgs) ->
case emqx_dashboard:start_listeners() of
ok ->
emqx_dashboard_cli:load(),
case emqx_dashboard_admin:add_bootstrap_user() of
case emqx_dashboard_admin:add_bootstrap_users() of
ok ->
{ok, _} = emqx_dashboard_admin:add_default_user(),
{ok, Sup};
Expand Down
4 changes: 2 additions & 2 deletions apps/emqx_dashboard/src/emqx_dashboard_schema.erl
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ fields("dashboard") ->
)},
{cors, fun cors/1},
{i18n_lang, fun i18n_lang/1},
{bootstrap_user_file,
?HOCON(binary(), #{desc => ?DESC(bootstrap_user_file), required => false})}
{bootstrap_users_file,
?HOCON(binary(), #{desc => ?DESC(bootstrap_users_file), required => false})}
];
fields("listeners") ->
[
Expand Down

0 comments on commit 0252325

Please sign in to comment.