Skip to content

Commit

Permalink
Make IsOwner policy check case-insensitive (#1989)
Browse files Browse the repository at this point in the history
  • Loading branch information
edbighead authored Jan 14, 2022
1 parent 69d6fb2 commit 1b30fe0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion server/events/yaml/valid/policies.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package valid

import (
"strings"

"github.com/hashicorp/go-version"
)

Expand Down Expand Up @@ -35,7 +37,7 @@ func (p *PolicySets) HasPolicies() bool {

func (p *PolicySets) IsOwner(username string) bool {
for _, uname := range p.Owners.Users {
if uname == username {
if strings.EqualFold(uname, username) {
return true
}
}
Expand Down

0 comments on commit 1b30fe0

Please sign in to comment.