Skip to content

Commit

Permalink
fix replication validation for Role ARN
Browse files Browse the repository at this point in the history
  • Loading branch information
poornas committed Jun 26, 2024
1 parent b28095b commit dcd76ca
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/replication/replication.go
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,9 @@ func (c *Config) EditRule(opts Options) error {
return fmt.Errorf("priority must be unique. Replication configuration already has a rule with this priority")
}
if rule.Destination.Bucket != newRule.Destination.Bucket && rule.ID == newRule.ID {
if c.Role == newRule.Destination.Bucket {
continue
}
return fmt.Errorf("invalid destination bucket for this rule")
}
}
Expand Down

0 comments on commit dcd76ca

Please sign in to comment.