mirror of
https://github.com/minio/minio.git
synced 2025-11-07 12:52:58 -05:00
pkg/wildcard: Simplify the wildcard logic further. (#2555)
This commit is contained in:
@@ -70,12 +70,12 @@ func bucketPolicyActionMatch(action string, statement policyStatement) bool {
|
||||
|
||||
// Match function matches wild cards in 'pattern' for resource.
|
||||
func resourceMatch(pattern, resource string) bool {
|
||||
return wildcard.MatchExtended(pattern, resource)
|
||||
return wildcard.Match(pattern, resource)
|
||||
}
|
||||
|
||||
// Match function matches wild cards in 'pattern' for action.
|
||||
func actionMatch(pattern, action string) bool {
|
||||
return wildcard.Match(pattern, action)
|
||||
return wildcard.MatchSimple(pattern, action)
|
||||
}
|
||||
|
||||
// Verify if given resource matches with policy statement.
|
||||
|
||||
@@ -114,7 +114,7 @@ func isElasticQueue(sqsArn arnSQS) bool {
|
||||
// Match function matches wild cards in 'pattern' for events.
|
||||
func eventMatch(eventType string, events []string) (ok bool) {
|
||||
for _, event := range events {
|
||||
ok = wildcard.Match(event, eventType)
|
||||
ok = wildcard.MatchSimple(event, eventType)
|
||||
if ok {
|
||||
break
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user