mirror of
https://github.com/minio/minio.git
synced 2025-11-28 21:18:10 -05:00
default to common conditions if conditions not present (#11546)
fixes #11544
This commit is contained in:
@@ -114,13 +114,8 @@ func (statement Statement) isValid() error {
|
||||
return Errorf("unsupported Resource found %v for action %v", statement.Resources, action)
|
||||
}
|
||||
|
||||
condKeys, ok := iamActionConditionKeyMap.Lookup(action)
|
||||
if !ok {
|
||||
return Errorf("conditions are not supported for action %v", action)
|
||||
}
|
||||
|
||||
keys := statement.Conditions.Keys()
|
||||
keyDiff := keys.Difference(condKeys)
|
||||
keyDiff := keys.Difference(iamActionConditionKeyMap.Lookup(action))
|
||||
if !keyDiff.IsEmpty() {
|
||||
return Errorf("unsupported condition keys '%v' used for action '%v'", keyDiff, action)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user