@@ -71,7 +71,7 @@ public void testAuthorize() {
7171 Set <BytesReference > query = Collections .singleton (new BytesArray ("{}" ));
7272 String [] fields = new String [] { "_field" };
7373 Role role = Role .builder (RESTRICTED_INDICES , "_role" )
74- .add (new FieldPermissions (fieldPermissionDef (fields , null )), query , IndexPrivilege .ALL , randomBoolean (), false , "_index" )
74+ .add (new FieldPermissions (fieldPermissionDef (fields , null )), query , IndexPrivilege .ALL , randomBoolean (), "_index" )
7575 .build ();
7676 IndicesAccessControl permissions = role .authorize (
7777 TransportSearchAction .TYPE .name (),
@@ -88,7 +88,7 @@ public void testAuthorize() {
8888
8989 // no document level security:
9090 role = Role .builder (RESTRICTED_INDICES , "_role" )
91- .add (new FieldPermissions (fieldPermissionDef (fields , null )), null , IndexPrivilege .ALL , randomBoolean (), false , "_index" )
91+ .add (new FieldPermissions (fieldPermissionDef (fields , null )), null , IndexPrivilege .ALL , randomBoolean (), "_index" )
9292 .build ();
9393 permissions = role .authorize (TransportSearchAction .TYPE .name (), Sets .newHashSet ("_index" ), md , fieldPermissionsCache );
9494 assertThat (permissions .getIndexPermissions ("_index" ), notNullValue ());
@@ -99,7 +99,7 @@ public void testAuthorize() {
9999
100100 // no field level security:
101101 role = Role .builder (RESTRICTED_INDICES , "_role" )
102- .add (FieldPermissions .DEFAULT , query , IndexPrivilege .ALL , randomBoolean (), false , "_index" )
102+ .add (FieldPermissions .DEFAULT , query , IndexPrivilege .ALL , randomBoolean (), "_index" )
103103 .build ();
104104 permissions = role .authorize (TransportSearchAction .TYPE .name (), Sets .newHashSet ("_index" ), md , fieldPermissionsCache );
105105 assertThat (permissions .getIndexPermissions ("_index" ), notNullValue ());
@@ -110,7 +110,7 @@ public void testAuthorize() {
110110
111111 // index group associated with an alias:
112112 role = Role .builder (RESTRICTED_INDICES , "_role" )
113- .add (new FieldPermissions (fieldPermissionDef (fields , null )), query , IndexPrivilege .ALL , randomBoolean (), false , "_alias" )
113+ .add (new FieldPermissions (fieldPermissionDef (fields , null )), query , IndexPrivilege .ALL , randomBoolean (), "_alias" )
114114 .build ();
115115 permissions = role .authorize (TransportSearchAction .TYPE .name (), Sets .newHashSet ("_alias" ), md , fieldPermissionsCache );
116116 assertThat (permissions .getIndexPermissions ("_index" ), notNullValue ());
@@ -134,7 +134,7 @@ public void testAuthorize() {
134134 new String [] { randomAlphaOfLengthBetween (1 , 10 ), "*" }
135135 );
136136 role = Role .builder (RESTRICTED_INDICES , "_role" )
137- .add (new FieldPermissions (fieldPermissionDef (allFields , null )), query , IndexPrivilege .ALL , randomBoolean (), false , "_alias" )
137+ .add (new FieldPermissions (fieldPermissionDef (allFields , null )), query , IndexPrivilege .ALL , randomBoolean (), "_alias" )
138138 .build ();
139139 permissions = role .authorize (TransportSearchAction .TYPE .name (), Sets .newHashSet ("_alias" ), md , fieldPermissionsCache );
140140 assertThat (permissions .getIndexPermissions ("_index" ), notNullValue ());
@@ -158,8 +158,8 @@ public void testAuthorize() {
158158 Set <BytesReference > fooQuery = Collections .singleton (new BytesArray ("{foo}" ));
159159 allFields = randomFrom (new String [] { "*" }, new String [] { "foo" , "*" }, new String [] { randomAlphaOfLengthBetween (1 , 10 ), "*" });
160160 role = Role .builder (RESTRICTED_INDICES , "_role" )
161- .add (new FieldPermissions (fieldPermissionDef (allFields , null )), fooQuery , IndexPrivilege .ALL , randomBoolean (), false , "_alias" )
162- .add (new FieldPermissions (fieldPermissionDef (allFields , null )), query , IndexPrivilege .ALL , randomBoolean (), false , "_alias" )
161+ .add (new FieldPermissions (fieldPermissionDef (allFields , null )), fooQuery , IndexPrivilege .ALL , randomBoolean (), "_alias" )
162+ .add (new FieldPermissions (fieldPermissionDef (allFields , null )), query , IndexPrivilege .ALL , randomBoolean (), "_alias" )
163163 .build ();
164164 permissions = role .authorize (TransportSearchAction .TYPE .name (), Sets .newHashSet ("_alias" ), md , fieldPermissionsCache );
165165 Set <BytesReference > bothQueries = Sets .union (fooQuery , query );
@@ -193,8 +193,8 @@ public void testAuthorizeMultipleGroupsMixedDls() {
193193 Set <BytesReference > query = Collections .singleton (new BytesArray ("{}" ));
194194 String [] fields = new String [] { "_field" };
195195 Role role = Role .builder (RESTRICTED_INDICES , "_role" )
196- .add (new FieldPermissions (fieldPermissionDef (fields , null )), query , IndexPrivilege .ALL , randomBoolean (), false , "_index" )
197- .add (new FieldPermissions (fieldPermissionDef (null , null )), null , IndexPrivilege .ALL , randomBoolean (), false , "*" )
196+ .add (new FieldPermissions (fieldPermissionDef (fields , null )), query , IndexPrivilege .ALL , randomBoolean (), "_index" )
197+ .add (new FieldPermissions (fieldPermissionDef (null , null )), null , IndexPrivilege .ALL , randomBoolean (), "*" )
198198 .build ();
199199 IndicesAccessControl permissions = role .authorize (
200200 TransportSearchAction .TYPE .name (),
0 commit comments