anchor.diff:      ?assertMatch([], list_indices_via_rest(Config, WorkerP1, ?SPACE_ID, 100), ?ATTEMPTS),
       ?assertMatch([], list_indices_via_rest(Config, WorkerP2, ?SPACE_ID, 100), ?ATTEMPTS).
   
  +
   create_get_delete_reduce_fun(Config) ->
       Workers = [WorkerP1, WorkerP2 | _] = ?config(op_worker_nodes, Config),
       Provider1 = ?PROVIDER_ID(WorkerP1),
       IndexName = ?INDEX_NAME(?FUNCTION_NAME),
       XattrName = ?XATTR_NAME,
  +    UserId = <<"user1">>,
  +
  +    AllPrivs = privileges:space_privileges(),
  +    ErrorForbidden = rest_test_utils:get_rest_error(?ERROR_FORBIDDEN),
   
       % create on one provider
       ?assertMatch([], list_indices_via_rest(Config, WorkerP1, ?SPACE_ID, 100)),
  
positive.code:     Url = str_utils:format_bin("spaces/~s/indices?~s~s", [
          Space, TokenParam, LimitParam
      ]),
      {ok, _, _, Body} = ?assertMatch({ok, 200, _, _}, rest_test_utils:request(
          Worker, Url, get, ?USER_1_AUTH_HEADERS(Config), <<>>
      )),
      ParsedBody = json_utils:decode(Body),
      Indices = maps:get(<<"indices">>, ParsedBody),
      NextPageToken = maps:get(<<"nextPageToken">>, ParsedBody, <<"null">>),
      {Indices, NextPageToken}.
  
  remove_all_indices(Nodes, SpaceId) ->
      lists:foreach(fun(Node) ->
  
negative.code:     application:stop(ssl),
      initializer:teardown_storage(Config).
  
  init_per_testcase(Case, Config) when
      Case =:= create_get_update_delete_index;
      Case =:= create_get_delete_reduce_fun;
      Case =:= list_indices;
      Case =:= query_index
  ->
      [WorkerP1, _| _] = ?config(op_worker_nodes, Config),
      OldPrivs = rpc:call(WorkerP1, initializer, node_get_mocked_space_user_privileges, [?SPACE_ID, <<"user1">>]),
      init_per_testcase(all, [{old_privs, OldPrivs} | Config]);
  
  init_per_testcase(query_file_popularity_index, Config) ->
      Config2 = sort_workers(Config),
      [WorkerP1, WorkerP2| _] = ?config(op_worker_nodes, Config2),
  