mirror of
https://github.com/pgsty/minio.git
synced 2026-08-09 15:53:28 +03:00
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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user