mirror of
https://github.com/grafana/grafana.git
synced 2026-08-18 17:15:08 -05:00
Chore: Add user service method GetByLogin (#53204)
* Add wrapper around sqlstore method GetUserByLogin * Use new method from user service * Fix lint * Fix lint 2 * fix middleware basic auth test * Fix grafana login returning a user by login * Remove GetUserByLogin from store interface * Merge commit
This commit is contained in:
@@ -137,11 +137,6 @@ func (m *SQLStoreMock) CreateUser(ctx context.Context, cmd user.CreateUserComman
|
||||
return nil, m.ExpectedError
|
||||
}
|
||||
|
||||
func (m *SQLStoreMock) GetUserByLogin(ctx context.Context, query *models.GetUserByLoginQuery) error {
|
||||
query.Result = m.ExpectedUser
|
||||
return m.ExpectedError
|
||||
}
|
||||
|
||||
func (m *SQLStoreMock) GetUserByEmail(ctx context.Context, query *models.GetUserByEmailQuery) error {
|
||||
return m.ExpectedError
|
||||
}
|
||||
|
||||
@@ -31,7 +31,6 @@ type Store interface {
|
||||
GetUserLoginAttemptCount(ctx context.Context, query *models.GetUserLoginAttemptCountQuery) error
|
||||
DeleteOldLoginAttempts(ctx context.Context, cmd *models.DeleteOldLoginAttemptsCommand) error
|
||||
CreateUser(ctx context.Context, cmd user.CreateUserCommand) (*user.User, error)
|
||||
GetUserByLogin(ctx context.Context, query *models.GetUserByLoginQuery) error
|
||||
GetUserByEmail(ctx context.Context, query *models.GetUserByEmailQuery) error
|
||||
UpdateUser(ctx context.Context, cmd *models.UpdateUserCommand) error
|
||||
ChangeUserPassword(ctx context.Context, cmd *models.ChangeUserPasswordCommand) error
|
||||
|
||||
Reference in New Issue
Block a user