mirror of
https://github.com/minio/minio.git
synced 2025-11-09 13:39:46 -05:00
Fix user IAM policy regression, reload policy appropriately (#7770)
Introduce in commit 7e4c9a9e1e
Fixes #7769
This commit is contained in:
committed by
kannappanr
parent
22f6756ce6
commit
b4ab778cb2
@@ -763,7 +763,7 @@ func reloadPolicy(ctx context.Context, objectAPI ObjectLayer, prefix string,
|
||||
if err = json.Unmarshal(pdata, &p); err != nil {
|
||||
return err
|
||||
}
|
||||
cannedPolicyMap[path.Base(prefix)] = p
|
||||
cannedPolicyMap[policyName] = p
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -778,7 +778,8 @@ func reloadPolicies(objectAPI ObjectLayer, prefix string, cannedPolicyMap map[st
|
||||
}
|
||||
marker = lo.NextMarker
|
||||
for _, prefix := range lo.Prefixes {
|
||||
if err = reloadPolicy(context.Background(), objectAPI, "", prefix, cannedPolicyMap); err != nil {
|
||||
if err = reloadPolicy(context.Background(), objectAPI, iamConfigPoliciesPrefix,
|
||||
path.Base(prefix), cannedPolicyMap); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user