github.com/argoproj/argo-cd/v3@v3.2.1/util/security/application_namespaces.go (about) 1 package security 2 3 import ( 4 "fmt" 5 6 "github.com/argoproj/argo-cd/v3/util/glob" 7 ) 8 9 func IsNamespaceEnabled(namespace string, serverNamespace string, enabledNamespaces []string) bool { 10 return namespace == serverNamespace || glob.MatchStringInList(enabledNamespaces, namespace, glob.REGEXP) 11 } 12 13 func NamespaceNotPermittedError(namespace string) error { 14 return fmt.Errorf("namespace '%s' is not permitted", namespace) 15 }