mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: Remove bus from admin users (#44869)
* Chore: Remove bus from admin users * Mock authinfoservice * Update user id * attempt to fix the tests in admin users api * fix type cast * revert skipped tests Co-authored-by: Serge Zaitsev <serge.zaitsev@grafana.com>
This commit is contained in:
@@ -10,6 +10,7 @@ import (
|
||||
|
||||
type SQLStoreMock struct {
|
||||
LastGetAlertsQuery *models.GetAlertsQuery
|
||||
LatestUserId int64
|
||||
|
||||
ExpectedUser *models.User
|
||||
ExpectedDatasource *models.DataSource
|
||||
@@ -156,11 +157,17 @@ func (m *SQLStoreMock) GetSignedInUser(ctx context.Context, query *models.GetSig
|
||||
return m.ExpectedError
|
||||
}
|
||||
|
||||
func (m *SQLStoreMock) DisableUser(ctx context.Context, cmd *models.DisableUserCommand) error {
|
||||
m.LatestUserId = cmd.UserId
|
||||
return m.ExpectedError
|
||||
}
|
||||
|
||||
func (m *SQLStoreMock) BatchDisableUsers(ctx context.Context, cmd *models.BatchDisableUsersCommand) error {
|
||||
return m.ExpectedError
|
||||
}
|
||||
|
||||
func (m *SQLStoreMock) DeleteUser(ctx context.Context, cmd *models.DeleteUserCommand) error {
|
||||
m.LatestUserId = cmd.UserId
|
||||
return m.ExpectedError
|
||||
}
|
||||
|
||||
|
||||
@@ -41,6 +41,7 @@ type Store interface {
|
||||
GetUserOrgList(ctx context.Context, query *models.GetUserOrgListQuery) error
|
||||
GetSignedInUserWithCacheCtx(ctx context.Context, query *models.GetSignedInUserQuery) error
|
||||
GetSignedInUser(ctx context.Context, query *models.GetSignedInUserQuery) error
|
||||
DisableUser(ctx context.Context, cmd *models.DisableUserCommand) error
|
||||
BatchDisableUsers(ctx context.Context, cmd *models.BatchDisableUsersCommand) error
|
||||
DeleteUser(ctx context.Context, cmd *models.DeleteUserCommand) error
|
||||
UpdateUserPermissions(userID int64, isAdmin bool) error
|
||||
|
||||
Reference in New Issue
Block a user