mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-12 16:16:55 +00:00
rewrite service_account handler
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user