mirror of
https://github.com/minio/minio.git
synced 2025-11-20 01:50:24 -05:00
policy: Allow duplicate statements with different effects (#8775)
This allows "Allow" and "Deny" conflicting statements, where we evaluate to implicit "Deny".
This commit is contained in:
@@ -88,6 +88,10 @@ func (policy Policy) isValid() error {
|
||||
|
||||
for i := range policy.Statements {
|
||||
for _, statement := range policy.Statements[i+1:] {
|
||||
if policy.Statements[i].Effect != statement.Effect {
|
||||
continue
|
||||
}
|
||||
|
||||
principals := policy.Statements[i].Principal.Intersection(statement.Principal)
|
||||
if principals.IsEmpty() {
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user