mirror of
https://github.com/minio/minio.git
synced 2025-11-07 21:02:58 -05:00
fix: skip policy usage validation for cache update (#19008)
When updating the policy cache, we do not need to validate policy usage as the policy has already been deleted by the node sending the notification.
This commit is contained in:
committed by
GitHub
parent
7e082f232e
commit
e104b183d8
@@ -526,7 +526,9 @@ func (sys *IAMSys) GetRolePolicy(arnStr string) (arn.ARN, string, error) {
|
||||
return roleArn, rolePolicy, nil
|
||||
}
|
||||
|
||||
// DeletePolicy - deletes a canned policy from backend or etcd.
|
||||
// DeletePolicy - deletes a canned policy from backend. `notifyPeers` is true
|
||||
// whenever this is called via the API. It is false when called via a
|
||||
// notification from another peer. This is to avoid infinite loops.
|
||||
func (sys *IAMSys) DeletePolicy(ctx context.Context, policyName string, notifyPeers bool) error {
|
||||
if !sys.Initialized() {
|
||||
return errServerNotInitialized
|
||||
@@ -540,7 +542,7 @@ func (sys *IAMSys) DeletePolicy(ctx context.Context, policyName string, notifyPe
|
||||
}
|
||||
}
|
||||
|
||||
err := sys.store.DeletePolicy(ctx, policyName)
|
||||
err := sys.store.DeletePolicy(ctx, policyName, !notifyPeers)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user