mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-07-25 07:41:00 +00:00
Authentication: AuthFilter::allow_index_creation both check that the index is authorized and the IndexCreate action
This commit is contained in:
@ -173,8 +173,8 @@ impl Default for AuthFilter {
|
||||
|
||||
impl AuthFilter {
|
||||
#[inline]
|
||||
pub fn allow_index_creation(&self) -> bool {
|
||||
self.allow_index_creation
|
||||
pub fn allow_index_creation(&self, index: &str) -> bool {
|
||||
self.allow_index_creation && self.is_index_authorized(index)
|
||||
}
|
||||
|
||||
pub fn with_allowed_indexes(allowed_indexes: HashSet<IndexUidPattern>) -> Self {
|
||||
|
Reference in New Issue
Block a user