Chore: Move identity and errutil to apimachinery module (#89116)

This commit is contained in:
Ryan McKinley
2024-06-13 07:11:35 +03:00
committed by GitHub
parent 12a45fdeca
commit 99d8025829
298 changed files with 575 additions and 393 deletions

View File

@@ -29,8 +29,8 @@ import (
"github.com/grafana/grafana-azure-sdk-go/v2/azsettings"
"github.com/grafana/grafana-plugin-sdk-go/backend/gtime"
"github.com/grafana/grafana/pkg/apimachinery/identity"
"github.com/grafana/grafana/pkg/infra/log"
"github.com/grafana/grafana/pkg/models/roletype"
"github.com/grafana/grafana/pkg/util"
"github.com/grafana/grafana/pkg/util/osutil"
)
@@ -1657,11 +1657,11 @@ func readUserSettings(iniFile *ini.File, cfg *Cfg) error {
cfg.AutoAssignOrgId = users.Key("auto_assign_org_id").MustInt(1)
cfg.LoginDefaultOrgId = users.Key("login_default_org_id").MustInt64(-1)
cfg.AutoAssignOrgRole = users.Key("auto_assign_org_role").In(
string(roletype.RoleViewer), []string{
string(roletype.RoleNone),
string(roletype.RoleViewer),
string(roletype.RoleEditor),
string(roletype.RoleAdmin)})
string(identity.RoleViewer), []string{
string(identity.RoleNone),
string(identity.RoleViewer),
string(identity.RoleEditor),
string(identity.RoleAdmin)})
cfg.VerifyEmailEnabled = users.Key("verify_email_enabled").MustBool(false)
// Deprecated