+13
-1
cmd/up.go
+13
-1
cmd/up.go
···
826
826
authorizedEmails = append(authorizedEmails, k.Strings("authorizedEmails")...)
827
827
authorizedEmails = append(authorizedEmails, k.Strings(fmt.Sprintf("apps.%s.authorizedEmails", appname))...)
828
828
829
+
for _, authorizedEmail := range authorizedEmails {
830
+
if match, _ := doublestar.Match(authorizedEmail, email); match {
831
+
return true
832
+
}
833
+
}
834
+
829
835
var authorizedGroups []string
830
836
authorizedGroups = append(authorizedGroups, k.Strings("authorizedGroups")...)
831
837
authorizedGroups = append(authorizedGroups, k.Strings(fmt.Sprintf("apps.%s.authorizedGroups", appname))...)
832
838
833
-
return slices.Contains(authorizedEmails, email) || slices.Contains(authorizedGroups, group)
839
+
for _, authorizedGroup := range authorizedGroups {
840
+
if match, _ := doublestar.Match(authorizedGroup, group); match {
841
+
return true
842
+
}
843
+
}
844
+
845
+
return false
834
846
}
835
847
836
848
type Claims struct {