feat: introduce listUsers, listPolicies for any bucket (#12372)

Bonus change LDAP settings such as user, group mappings
are now listed as part of `mc admin user list` and
`mc admin group list`

Additionally this PR also deprecates the `/v2` API
that is no longer in use.
This commit is contained in:
Harshavardhana
2021-05-27 10:15:02 -07:00
committed by GitHub
parent b5ebfd35b4
commit be541dba8a
6 changed files with 163 additions and 72 deletions
+10
View File
@@ -99,6 +99,16 @@ func (resourceSet ResourceSet) MarshalJSON() ([]byte, error) {
return json.Marshal(resources)
}
// MatchResource matches object name with resource patterns only.
func (resourceSet ResourceSet) MatchResource(resource string) bool {
for r := range resourceSet {
if r.MatchResource(resource) {
return true
}
}
return false
}
// Match - matches object name with anyone of resource pattern in resource set.
func (resourceSet ResourceSet) Match(resource string, conditionValues map[string][]string) bool {
for r := range resourceSet {