Skip to content

Commit b8cd20a

Browse files
committed
fixup! Bug
1 parent 371c6b9 commit b8cd20a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/permission/IndicesPermission.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -694,6 +694,10 @@ private static boolean containsPrivilegeThatGrantsMappingUpdatesForBwc(Group gro
694694
* @return a list of tuples of all index and privilege pattern automaton
695695
*/
696696
public List<Tuple<Automaton, Automaton>> indexGroupAutomatons(boolean combine) {
697+
if (groups.length == 0) {
698+
return List.of();
699+
}
700+
697701
List<Tuple<Automaton, Automaton>> allAutomatons = new ArrayList<>();
698702
allAutomatons.add(new Tuple<>(groups[0].getIndexMatcherAutomaton(), groups[0].privilege().getAutomaton()));
699703

0 commit comments

Comments
 (0)