anchor.diff:      ValidateOnly = proplists:get_value("just_validate", Req:parse_qs()) =:= "1",
       U = proplists:get_value("username", PostArgs),
       P = proplists:get_value("password", PostArgs),
  -    Errors = [{K, V} || {K, V} <- [maybe_invalid(username, U),
  -                                   maybe_invalid(password, P)], V =/= true],
  +    Errors0 = [{K, V} || {K, V} <- [maybe_invalid(username, U),
  +                                    maybe_invalid(password, P)], V =/= true],
  +    RestCreds = ns_config:search('latest-config-marker', rest_creds, []),
  +    Errors = Errors0 ++
  +        case proplists:get_value(creds, RestCreds, []) of
  +            [{AdminUser, _} | _] ->
  +                case AdminUser =:= U of
  +                    true ->
  +                        [{username, <<"Read-only user cannot be same user as administrator">>}];
  +                    _ ->
  +                        []
  +                end;
  +            _ ->
  +                []
  +        end,
       case Errors of
           [] ->
               case ValidateOnly of
  
positive.code:                     ns_config:set(rest_creds,
                                    [{creds,
                                      [{U, [{password, P}]}]}]),
  
                      menelaus_ui_auth:reset()
  
  
negative.code:             reply_json(Req, {struct, [{errors, {struct, Errors}}]}, 400)
      end.
  
  reset_read_only_user_creds() ->
      ns_config:set(read_only_user_creds, null).
  
  handle_settings_read_only_user_delete(Req) ->
      case menelaus_auth:is_read_only_admin_exist() of
          false ->
              reply_json(Req, <<"Read-Only admin does not exist">>, 404);
          true ->
              reset_read_only_user_creds(),
              reply_json(Req, [], 200)
      end.
  
  