rewrite service_account handler

This commit is contained in:
weisd
2025-01-21 16:17:28 +08:00
parent 296791b56b
commit 4f1cbf72c6
13 changed files with 707 additions and 456 deletions
+7 -1
View File
@@ -605,7 +605,13 @@ struct ArgsBuilder {
fn policy_is_allowed(policy: Policy, args: ArgsBuilder) -> bool {
policy.is_allowed(&Args {
account: &args.account,
groups: &args.groups,
groups: &{
if args.groups.is_empty() {
None
} else {
Some(args.groups.clone())
}
},
action: args.action.as_str().try_into().unwrap(),
bucket: &args.bucket,
conditions: &args.conditions,