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:
idafurjes
2022-08-04 13:22:43 +02:00
committed by GitHub
parent 1ec9007fe0
commit 1ecbe22751
23 changed files with 122 additions and 84 deletions

View File

@@ -58,6 +58,10 @@ type CreateUserCommand struct {
IsServiceAccount bool
}
type GetUserByLoginQuery struct {
LoginOrEmail string
}
func (u *User) NameOrFallback() string {
if u.Name != "" {
return u.Name