File tree Expand file tree Collapse file tree 4 files changed +9
-18
lines changed
docs/reference/rest-api/security
server/src/main/java/org/elasticsearch/cluster/metadata
core/src/main/java/org/elasticsearch/xpack/core/security/authz/permission
security/src/main/java/org/elasticsearch/xpack/security/authz Expand file tree Collapse file tree 4 files changed +9
-18
lines changed Original file line number Diff line number Diff line change 1111For the most up-to-date API details, refer to {api-es}/group/endpoint-security[Security APIs].
1212--
1313
14- Retrieves the <<security-privileges,security privileges>> for the logged in
14+ Retrieves the <<security-privileges,security privileges>> for the logged in
1515user.
1616
1717[[security-api-get-user-privileges-request]]
2222[[security-api-get-user-privileges-prereqs]]
2323==== {api-prereq-title}
2424
25- * All users can use this API, but only to determine their own privileges. To
25+ * All users can use this API, but only to determine their own privileges. To
2626check the privileges of other users, you must use the run as feature. For
2727more information, see <<run-as-privilege>>.
2828
@@ -57,15 +57,6 @@ GET /_security/user/_privileges
5757 "all"
5858 ],
5959 "allow_restricted_indices" : true
60- },
61- {
62- "names" : [
63- "*::failures"
64- ],
65- "privileges" : [
66- "all"
67- ],
68- "allow_restricted_indices" : true
6960 }
7061 ],
7162 "applications" : [
Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ default boolean isDataStreamRelated() {
100100 return false ;
101101 }
102102
103- default boolean isDataStreamConcreteFailureIndex () {
103+ default boolean isConcreteFailureIndexOfDataStream () {
104104 return false ;
105105 }
106106
@@ -198,7 +198,7 @@ public boolean isSystem() {
198198 }
199199
200200 @ Override
201- public boolean isDataStreamConcreteFailureIndex () {
201+ public boolean isConcreteFailureIndexOfDataStream () {
202202 return getParentDataStream () != null && getParentDataStream ().isFailureStoreIndex (getName ());
203203 }
204204
Original file line number Diff line number Diff line change @@ -463,10 +463,10 @@ public boolean checkIndex(Group group) {
463463 if (ds != null ) {
464464 if (group .checkIndex (ds .getName ())) {
465465 // TODO is this right?
466- if ( indexAbstraction .isDataStreamConcreteFailureIndex ()) {
467- return group . checkSelector ( IndexComponentSelector .FAILURES );
468- }
469- return group .checkSelector (selector );
466+ final IndexComponentSelector selectorToCheck = indexAbstraction .isConcreteFailureIndexOfDataStream ()
467+ ? IndexComponentSelector .FAILURES
468+ : selector ;
469+ return group .checkSelector (selectorToCheck );
470470 }
471471 }
472472 if (indexAbstraction != null && indexAbstraction .getType () == IndexAbstraction .Type .DATA_STREAM ) {
Original file line number Diff line number Diff line change @@ -878,7 +878,7 @@ static AuthorizedIndices resolveAuthorizedIndicesFromRole(
878878 if (includeDataStreams ) {
879879 for (IndexAbstraction indexAbstraction : lookup .values ()) {
880880 // TODO this is not great ...
881- if ((indexAbstraction .isDataStreamConcreteFailureIndex ()
881+ if ((indexAbstraction .isConcreteFailureIndexOfDataStream ()
882882 && predicate .test (indexAbstraction .getParentDataStream (), IndexComponentSelector .FAILURES .getKey ()))
883883 || predicate .test (indexAbstraction , selector )) {
884884 indicesAndAliases .add (indexAbstraction .getName ());
You can’t perform that action at this time.
0 commit comments