Disallow only policy statements which are exactly same (#8785)

This commit is contained in:
Harshavardhana
2020-01-09 19:29:57 -08:00
committed by GitHub
parent 656146b699
commit 0a70bc24ac
7 changed files with 86 additions and 12 deletions
+5
View File
@@ -33,6 +33,11 @@ func (p Principal) IsValid() bool {
return len(p.AWS) != 0
}
// Equals - returns true if principals are equal.
func (p Principal) Equals(pp Principal) bool {
return p.AWS.Equals(pp.AWS)
}
// Intersection - returns principals available in both Principal.
func (p Principal) Intersection(principal Principal) set.StringSet {
return p.AWS.Intersection(principal.AWS)