Skip to content

Commit

Permalink
Allow index name patterns in Privileges index fields (#3127)
Browse files Browse the repository at this point in the history
(cherry picked from commit dd55c46)
  • Loading branch information
pquentin committed Nov 19, 2024
1 parent a1d3320 commit 5f0128d
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions specification/security/_types/Privileges.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,10 +220,12 @@ export class IndicesPrivileges {
* @doc_id field-and-document-access-control
*/
field_security?: FieldSecurity
// We're using IndexName | IndexName[] instead of Indices in this file on purpose:
// https://github.com/elastic/elasticsearch-specification/pull/3127
/**
* A list of indices (or index name patterns) to which the permissions in this entry apply.
*/
names: Indices
names: IndexName | IndexName[]
/**
* The index level privileges that owners of the role have on the specified indices.
*/
Expand Down Expand Up @@ -257,7 +259,7 @@ export class RemoteIndicesPrivileges {
/**
* A list of indices (or index name patterns) to which the permissions in this entry apply.
*/
names: Indices
names: IndexName | IndexName[]
/**
* The index level privileges that owners of the role have on the specified indices.
*/
Expand Down Expand Up @@ -297,7 +299,7 @@ export class UserIndicesPrivileges {
/**
* A list of indices (or index name patterns) to which the permissions in this entry apply.
*/
names: Indices
names: IndexName | IndexName[]
/**
* The index level privileges that owners of the role have on the specified indices.
*/
Expand Down Expand Up @@ -417,7 +419,7 @@ export class ReplicationAccess {
/**
* A list of indices (or index name patterns) to which the permissions in this entry apply.
*/
names: IndexName[]
names: IndexName | IndexName[]
/**
* This needs to be set to true if the patterns in the names field should cover system indices.
* @server_default false
Expand All @@ -434,7 +436,7 @@ export class SearchAccess {
/**
* A list of indices (or index name patterns) to which the permissions in this entry apply.
*/
names: IndexName[]
names: IndexName | IndexName[]
/**
* 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.
*/
Expand Down

0 comments on commit 5f0128d

Please sign in to comment.