Disabling deletion of all indices does not work when using _all, closes #1834.
This commit is contained in:
parent
f4d5a00b2d
commit
b3866689fa
|
@ -84,7 +84,7 @@ public class TransportDeleteIndexAction extends TransportMasterNodeOperationActi
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void doExecute(DeleteIndexRequest request, ActionListener<DeleteIndexResponse> listener) {
|
protected void doExecute(DeleteIndexRequest request, ActionListener<DeleteIndexResponse> listener) {
|
||||||
if (disableDeleteAllIndices && (request.indices() == null || request.indices().length == 0)) {
|
if (disableDeleteAllIndices && (request.indices() == null || request.indices().length == 0 || (request.indices().length == 1 && request.indices()[0].equals("_all")))) {
|
||||||
throw new ElasticSearchIllegalArgumentException("deleting all indices is disabled");
|
throw new ElasticSearchIllegalArgumentException("deleting all indices is disabled");
|
||||||
}
|
}
|
||||||
request.indices(clusterService.state().metaData().concreteIndices(request.indices()));
|
request.indices(clusterService.state().metaData().concreteIndices(request.indices()));
|
||||||
|
|
Loading…
Reference in New Issue