Skip to content

Commit f9e9b00

Browse files
authored
Merge pull request #10666 from everpcpc/fix-users
fix(query): warn about reserved built-in user
2 parents bb5461d + f3735fa commit f9e9b00

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/query/users/src/user_api.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ use common_meta_store::MetaStore;
3838
use common_meta_store::MetaStoreProvider;
3939
use common_meta_types::MatchSeq;
4040
use common_meta_types::MetaError;
41+
use tracing::warn;
4142

4243
use crate::idm_config::IDMConfig;
4344

@@ -69,6 +70,14 @@ impl UserApiProvider {
6970
idm_config: IDMConfig,
7071
) -> Result<Arc<UserApiProvider>> {
7172
let client = MetaStoreProvider::new(conf).create_meta_store().await?;
73+
for user in idm_config.users.keys() {
74+
match user.as_str() {
75+
"root" | "default" => {
76+
warn!("Reserved built-in user `{}` will be ignored", user);
77+
}
78+
_ => {}
79+
}
80+
}
7281
Ok(Arc::new(UserApiProvider {
7382
meta: client.clone(),
7483
client: client.arc(),

0 commit comments

Comments
 (0)