update ShieldActionMapper to handle the change to use TransportSingleShardAction

This relates to commit cafc7078e2 in elasticsearch

Original commit: elastic/x-pack-elasticsearch@72f8a92b80
This commit is contained in:
jaymode 2015-07-23 13:55:48 -04:00
parent 4b5faf00ac
commit 1e63141bf2
1 changed files with 2 additions and 1 deletions

View File

@ -35,9 +35,10 @@ public class ShieldActionMapper {
} }
break; break;
case AnalyzeAction.NAME: case AnalyzeAction.NAME:
case AnalyzeAction.NAME + "[s]":
assert request instanceof AnalyzeRequest; assert request instanceof AnalyzeRequest;
String[] indices = ((AnalyzeRequest) request).indices(); String[] indices = ((AnalyzeRequest) request).indices();
if (indices == null || indices.length == 0) { if (indices == null || (indices.length == 1 && indices[0] == null)) {
return CLUSTER_PERMISSION_ANALYZE; return CLUSTER_PERMISSION_ANALYZE;
} }
break; break;