mirror of
https://github.com/grafana/grafana.git
synced 2025-07-30 16:12:30 +08:00

* Add ofrep pkg * api server: Use namespace from request in case user is not authenticated * Add handlers to ofrep api builder * Add NewOpenFeatureService to initialize mt apiserver * allow specifying CA and insecure * Compare namespace with eval ctx stackID * Organize ofrep package * Implement AllowedV0Alpha1Resources * Revert folderimpl changes * Handle default namespace * Fix extracting stack id from eval ctx * Add more logs * Update pkg/registry/apis/ofrep/register.go Co-authored-by: Dave Henderson <dave.henderson@grafana.com> * Update pkg/registry/apis/ofrep/register.go Co-authored-by: Dave Henderson <dave.henderson@grafana.com> * Apply review feedback * Replace contexthandler with types * Fix identifying authed request * Refactor checks in the handlers * Remove anonymous from isAuthenticatedRequest check --------- Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com> Co-authored-by: Gabriel Mabille <gabriel.mabille@grafana.com> Co-authored-by: Charandas Batra <charandas.batra@grafana.com> Co-authored-by: Dave Henderson <dave.henderson@grafana.com>
12 lines
254 B
Go
12 lines
254 B
Go
package ofrep
|
|
|
|
// publicFlags contains the list of flags that can be evaluated by unauthenticated users
|
|
var publicFlags = map[string]bool{
|
|
"testflag": true,
|
|
}
|
|
|
|
func isPublicFlag(flagKey string) bool {
|
|
_, exists := publicFlags[flagKey]
|
|
return exists
|
|
}
|