Skip to content

Commit

Permalink
Make IsOwner policy check case-insensitive (runatlantis#1989)
Browse files Browse the repository at this point in the history
  • Loading branch information
edbighead authored and krrrr38 committed Dec 16, 2022
1 parent 6a7b12f commit f1bbc4b
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 f1bbc4b

Please sign in to comment.