Move SignedInUser to user service and RoleType and Roles to org (#53445)
* Move SignedInUser to user service and RoleType and Roles to org * Use go naming convention for roles * Fix some imports and leftovers * Fix ldap debug test * Fix lint * Fix lint 2 * Fix lint 3 * Fix type and not needed conversion * Clean up messages in api tests * Clean up api tests 2
This commit is contained in:
@@ -11,6 +11,7 @@ import (
|
||||
"github.com/grafana/grafana/pkg/infra/log"
|
||||
"github.com/grafana/grafana/pkg/models"
|
||||
"github.com/grafana/grafana/pkg/services/accesscontrol"
|
||||
"github.com/grafana/grafana/pkg/services/org"
|
||||
"github.com/grafana/grafana/pkg/services/sqlstore/migrations"
|
||||
acmig "github.com/grafana/grafana/pkg/services/sqlstore/migrations/accesscontrol"
|
||||
"github.com/grafana/grafana/pkg/services/sqlstore/migrator"
|
||||
@@ -276,35 +277,35 @@ func setupTeams(t *testing.T, x *xorm.Engine) {
|
||||
{
|
||||
OrgId: 1,
|
||||
UserId: 1,
|
||||
Role: models.ROLE_VIEWER,
|
||||
Role: org.RoleViewer,
|
||||
Created: now,
|
||||
Updated: now,
|
||||
},
|
||||
{
|
||||
OrgId: 1,
|
||||
UserId: 2,
|
||||
Role: models.ROLE_VIEWER,
|
||||
Role: org.RoleViewer,
|
||||
Created: now,
|
||||
Updated: now,
|
||||
},
|
||||
{
|
||||
OrgId: 1,
|
||||
UserId: 3,
|
||||
Role: models.ROLE_EDITOR,
|
||||
Role: org.RoleEditor,
|
||||
Created: now,
|
||||
Updated: now,
|
||||
},
|
||||
{
|
||||
OrgId: 1,
|
||||
UserId: 4,
|
||||
Role: models.ROLE_ADMIN,
|
||||
Role: org.RoleAdmin,
|
||||
Created: now,
|
||||
Updated: now,
|
||||
},
|
||||
{
|
||||
OrgId: 2,
|
||||
UserId: 5,
|
||||
Role: models.ROLE_EDITOR,
|
||||
Role: org.RoleEditor,
|
||||
Created: now,
|
||||
Updated: now,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user