mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-03 11:57:07 +02:00
Authentication: AuthFilter::allow_index_creation both check that the index is authorized and the IndexCreate action
This commit is contained in:
parent
690bb2e5cc
commit
14c4a222da
4 changed files with 11 additions and 10 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue