You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Support multi-intersection for FieldPermissions (#91169)
This PR is the 2nd half of updating DocumentPermissions and FieldPermissions
to support multi-level of limiting similar to LimitedRole (since #81403).
Instead of hard coding fieldsDefinition and limitedByFieldsDefinition,
this PR replaces them with a list of fieldsDefinitions which can accomodate
multiple of them (more than 2).
Relates: #91151
Copy file name to clipboardExpand all lines: x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/permission/FieldPermissions.java
Copy file name to clipboardExpand all lines: x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/permission/FieldPermissionsCache.java
+9-10Lines changed: 9 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -72,26 +72,25 @@ public FieldPermissions getFieldPermissions(FieldPermissionsDefinition fieldPerm
72
72
}
73
73
74
74
/**
75
-
* Returns a field permissions object that corresponds to the merging of the given field permissions and caches the instance if one was
76
-
* not found in the cache.
75
+
* Returns a field permissions object that corresponds to the union of the given field permissions.
76
+
* Union means a field is granted if it is granted by any of the FieldPermissions from the given
77
+
* collection.
78
+
* The returned instance is cached if one was not found in the cache.
Copy file name to clipboardExpand all lines: x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/permission/IndicesPermission.java
Copy file name to clipboardExpand all lines: x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/security/authz/accesscontrol/SecurityIndexReaderWrapperIntegrationTests.java
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -159,7 +159,7 @@ public void testDLS() throws Exception {
Copy file name to clipboardExpand all lines: x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/security/authz/permission/FieldPermissionsCacheTests.java
+6-8Lines changed: 6 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -44,9 +44,7 @@ public void testMergeFieldPermissions() {
0 commit comments