mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-03 03:47:02 +02:00
Authentication: Make allow_index_creation a private field
This commit is contained in:
parent
d0f2c9c72e
commit
690bb2e5cc
3 changed files with 12 additions and 7 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue