File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ package policy
1919
2020import (
2121 "github.com/minio/pkg/v3/policy/condition"
22+ "github.com/minio/pkg/v3/wildcard"
2223)
2324
2425// AdminAction - admin policy action.
@@ -362,10 +363,19 @@ var SupportedAdminActions = map[AdminAction]struct{}{
362363 AllAdminActions : {},
363364}
364365
366+ // Match - matches action name with action pattern.
367+ func (action AdminAction ) Match (a AdminAction ) bool {
368+ return wildcard .Match (string (action ), string (a ))
369+ }
370+
365371// IsValid - checks if action is valid or not.
366372func (action AdminAction ) IsValid () bool {
367- _ , ok := SupportedAdminActions [action ]
368- return ok
373+ for supAction := range SupportedAdminActions {
374+ if action .Match (supAction ) {
375+ return true
376+ }
377+ }
378+ return false
369379}
370380
371381func createAdminActionConditionKeyMap () map [Action ]condition.KeySet {
You can’t perform that action at this time.
0 commit comments