Skip to content

Commit 526bfec

Browse files
Error message wording #14545
1 parent 31e5a72 commit 526bfec

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

deps/rabbitmq_management/src/rabbit_mgmt_wm_user.erl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ accept_content(ReqData0, Context = #context{user = #user{username = ActingUser}}
4949
case rabbit_mgmt_util:is_protected_user(Username) of
5050
true ->
5151
rabbit_mgmt_util:bad_request(
52-
<<"User updates via API are disabled for this user">>,
52+
<<"Users tagged with 'protected' cannot be updated via the HTTP API">>,
5353
ReqData0, Context);
5454
false ->
5555
rabbit_mgmt_util:with_decode(
@@ -65,7 +65,7 @@ delete_resource(ReqData, Context = #context{user = #user{username = ActingUser}}
6565
case rabbit_mgmt_util:is_protected_user(User) of
6666
true ->
6767
rabbit_mgmt_util:bad_request(
68-
<<"User deletion via API is disabled for this user">>,
68+
<<"Users tagged with 'protected' cannot be deleted via the HTTP API">>,
6969
ReqData, Context);
7070
false ->
7171
rabbit_auth_backend_internal:delete_user(User, ActingUser),

deps/rabbitmq_management/test/rabbit_mgmt_http_SUITE.erl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -663,11 +663,11 @@ users_protected_test(Config) ->
663663
rabbit_ct_broker_helpers:add_user(Config, ProtectedUser),
664664
rabbit_ct_broker_helpers:set_user_tags(Config, 0, ProtectedUser, [management, protected]),
665665

666-
%% Verify protected user cannot be updated via API
666+
%% Verify that a protected user cannot be updated via the HTTP API
667667
http_put(Config, "/users/protected_user", [{password, <<"new_password">>},
668668
{tags, <<"management,protected">>}], ?BAD_REQUEST),
669669

670-
%% Verify protected user cannot be deleted via API
670+
%% Verify that a protected user cannot be deleted via the HTTP API
671671
http_delete(Config, "/users/protected_user", ?BAD_REQUEST),
672672

673673
rabbit_ct_broker_helpers:delete_user(Config, ProtectedUser),

0 commit comments

Comments
 (0)