this repo has no description smallweb.run
smallweb
4
fork

Configure Feed

Select the types of activity you want to include in your feed.

add support for wildcards in authorizedEmails

pomdtr f3e30d21 a5061ddf

+13 -1
+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 {