mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
K8s: Ensure there is always a user in appcontext.User (#78247)
This commit is contained in:
@@ -1,9 +1,7 @@
|
||||
package authorizer
|
||||
|
||||
import (
|
||||
"k8s.io/apiserver/pkg/authentication/user"
|
||||
"k8s.io/apiserver/pkg/authorization/authorizer"
|
||||
"k8s.io/apiserver/pkg/authorization/authorizerfactory"
|
||||
"k8s.io/apiserver/pkg/authorization/union"
|
||||
|
||||
"github.com/grafana/grafana/pkg/services/grafana-apiserver/auth/authorizer/org"
|
||||
@@ -17,12 +15,7 @@ func ProvideAuthorizer(
|
||||
stackIDAuthorizer *stack.StackIDAuthorizer,
|
||||
cfg *setting.Cfg,
|
||||
) authorizer.Authorizer {
|
||||
authorizers := []authorizer.Authorizer{
|
||||
// This will allow privileged uses to do anything.
|
||||
// In development mode, a privileged user is configured and saved into:
|
||||
// ${data}/grafana-apiserver/grafana.kubeconfig
|
||||
authorizerfactory.NewPrivilegedGroups(user.SystemPrivilegedGroup),
|
||||
}
|
||||
authorizers := []authorizer.Authorizer{}
|
||||
|
||||
// In Hosted grafana, the StackID replaces the orgID as a valid namespace
|
||||
if cfg.StackID != "" {
|
||||
|
||||
Reference in New Issue
Block a user