mirror of
https://github.com/pgsty/minio.git
synced 2026-08-09 07:43:29 +03:00
Disallow only policy statements which are exactly same (#8785)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user