Skip to content

Commit 5f0128d

Browse files
committed
Allow index name patterns in Privileges index fields (#3127)
(cherry picked from commit dd55c46)
1 parent a1d3320 commit 5f0128d

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

specification/security/_types/Privileges.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -220,10 +220,12 @@ export class IndicesPrivileges {
220220
* @doc_id field-and-document-access-control
221221
*/
222222
field_security?: FieldSecurity
223+
// We're using IndexName | IndexName[] instead of Indices in this file on purpose:
224+
// https://github.com/elastic/elasticsearch-specification/pull/3127
223225
/**
224226
* A list of indices (or index name patterns) to which the permissions in this entry apply.
225227
*/
226-
names: Indices
228+
names: IndexName | IndexName[]
227229
/**
228230
* The index level privileges that owners of the role have on the specified indices.
229231
*/
@@ -257,7 +259,7 @@ export class RemoteIndicesPrivileges {
257259
/**
258260
* A list of indices (or index name patterns) to which the permissions in this entry apply.
259261
*/
260-
names: Indices
262+
names: IndexName | IndexName[]
261263
/**
262264
* The index level privileges that owners of the role have on the specified indices.
263265
*/
@@ -297,7 +299,7 @@ export class UserIndicesPrivileges {
297299
/**
298300
* A list of indices (or index name patterns) to which the permissions in this entry apply.
299301
*/
300-
names: Indices
302+
names: IndexName | IndexName[]
301303
/**
302304
* The index level privileges that owners of the role have on the specified indices.
303305
*/
@@ -417,7 +419,7 @@ export class ReplicationAccess {
417419
/**
418420
* A list of indices (or index name patterns) to which the permissions in this entry apply.
419421
*/
420-
names: IndexName[]
422+
names: IndexName | IndexName[]
421423
/**
422424
* This needs to be set to true if the patterns in the names field should cover system indices.
423425
* @server_default false
@@ -434,7 +436,7 @@ export class SearchAccess {
434436
/**
435437
* A list of indices (or index name patterns) to which the permissions in this entry apply.
436438
*/
437-
names: IndexName[]
439+
names: IndexName | IndexName[]
438440
/**
439441
* A search query that defines the documents the owners of the role have access to. A document within the specified indices must match this query for it to be accessible by the owners of the role.
440442
*/

0 commit comments

Comments
 (0)