Skip to content

Commit

Permalink
fixing permissions for docs test
Browse files Browse the repository at this point in the history
  • Loading branch information
masseyke committed Oct 30, 2023
1 parent 8fc1e85 commit 896c3c3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,11 @@
package org.elasticsearch.action.bulk;

import org.elasticsearch.action.ActionType;
import org.elasticsearch.transport.TransportRequestOptions;

public class SimulateBulkAction extends ActionType<BulkResponse> {

public static final SimulateBulkAction INSTANCE = new SimulateBulkAction();
public static final String NAME = "indices:admin/simulate/bulk";

private static final TransportRequestOptions TRANSPORT_REQUEST_OPTIONS = TransportRequestOptions.of(
null,
TransportRequestOptions.Type.BULK
);

public static final String NAME = "indices:data/simulate/bulk";
private SimulateBulkAction() {
super(NAME, BulkResponse::new);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import org.elasticsearch.action.admin.indices.alias.IndicesAliasesRequest;
import org.elasticsearch.action.bulk.BulkAction;
import org.elasticsearch.action.bulk.BulkShardRequest;
import org.elasticsearch.action.bulk.SimulateBulkAction;
import org.elasticsearch.action.delete.DeleteAction;
import org.elasticsearch.action.get.MultiGetAction;
import org.elasticsearch.action.index.IndexAction;
Expand Down Expand Up @@ -251,6 +252,7 @@ static boolean checkSameUserPermissions(String action, TransportRequest request,
private static boolean shouldAuthorizeIndexActionNameOnly(String action, TransportRequest request) {
switch (action) {
case BulkAction.NAME:
case SimulateBulkAction.NAME:
case IndexAction.NAME:
case DeleteAction.NAME:
case INDEX_SUB_REQUEST_PRIMARY:
Expand Down

0 comments on commit 896c3c3

Please sign in to comment.