Disabling deletion of all indices does not work when using _all, closes #1834.

This commit is contained in:
Shay Banon 2012-04-03 12:33:00 +03:00
parent f4d5a00b2d
commit b3866689fa
1 changed files with 1 additions and 1 deletions

View File

@ -84,7 +84,7 @@ public class TransportDeleteIndexAction extends TransportMasterNodeOperationActi
@Override
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");
}
request.indices(clusterService.state().metaData().concreteIndices(request.indices()));