Skip to content

Commit aa74147

Browse files
committed
More selector handling
1 parent 599658d commit aa74147

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/accesscontrol/IndicesAccessControl.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
*/
77
package org.elasticsearch.xpack.core.security.authz.accesscontrol;
88

9+
import org.elasticsearch.action.support.IndexComponentSelector;
910
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
1011
import org.elasticsearch.common.io.stream.StreamOutput;
1112
import org.elasticsearch.common.util.CachedSupplier;
@@ -62,7 +63,12 @@ protected IndicesAccessControl(IndicesAccessControl copy) {
6263
@Nullable
6364
public IndexAccessControl getIndexPermissions(String index) {
6465
Tuple<String, String> indexAndSelector = IndexNameExpressionResolver.splitSelectorExpression(index);
65-
return this.getAllIndexPermissions().get(indexAndSelector.v1());
66+
return this.getAllIndexPermissions()
67+
.get(
68+
IndexComponentSelector.FAILURES.equals(IndexComponentSelector.getByKey(indexAndSelector.v2()))
69+
? index
70+
: indexAndSelector.v1()
71+
);
6672
}
6773

6874
public boolean hasIndexPermissions(String index) {

0 commit comments

Comments
 (0)