Authentication: Make allow_index_creation a private field

This commit is contained in:
Louis Dureuil 2023-02-19 15:08:36 +01:00
parent d0f2c9c72e
commit 690bb2e5cc
No known key found for this signature in database
3 changed files with 12 additions and 7 deletions

View file

@ -158,7 +158,7 @@ impl AuthController {
pub struct AuthFilter {
search_rules: Option<SearchRules>,
key_authorized_indexes: SearchRules,
pub allow_index_creation: bool,
allow_index_creation: bool,
}
impl Default for AuthFilter {
@ -172,6 +172,11 @@ impl Default for AuthFilter {
}
impl AuthFilter {
#[inline]
pub fn allow_index_creation(&self) -> bool {
self.allow_index_creation
}
pub fn with_allowed_indexes(allowed_indexes: HashSet<IndexUidPattern>) -> Self {
Self {
search_rules: None,