iam add_user

This commit is contained in:
weisd
2025-01-12 03:04:14 +08:00
parent 1c44e2d099
commit 0aaef2d9a8
4 changed files with 102 additions and 30 deletions
+1 -1
View File
@@ -100,7 +100,7 @@ pub struct Credentials {
pub status: String,
pub parent_user: String,
pub groups: Option<Vec<String>>,
pub claims: Option<HashMap<String, Vec<String>>>,
pub claims: Option<HashMap<String, String>>,
pub name: Option<String>,
pub description: Option<String>,
}
+13 -1
View File
@@ -20,7 +20,7 @@ use tokio::{
use crate::{
arn::ARN,
auth::{Credentials, UserIdentity},
auth::{self, Credentials, UserIdentity},
cache::Cache,
format::Format,
handler::Handler,
@@ -309,4 +309,16 @@ where
Ok(m)
}
pub async fn add_user(&self, access_key: &str, secret_key: &str, status: &str) -> crate::Result<()> {
let status = {
match status {
"disabled" => auth::ACCOUNT_ON,
auth::ACCOUNT_ON => auth::ACCOUNT_ON,
_ => auth::ACCOUNT_OFF,
}
};
todo!()
}
}