Chore: Add Get User Profile to user and Get User Org List to org service (#53788)

* Remove delete suer from store interface

* Remove get signed in user with cache ctx from store interface

* Support options when setting up access control tests

* Fix broken tests

* Fix lint

* Add user fake to middleware

* Fix middleware tests, remove usertest being initialised twice

* Chore: Add Get User Profile to user and Get User Org List to org service

Co-authored-by: Karl Persson <kalle.persson@grafana.com>
This commit is contained in:
idafurjes
2022-08-16 17:50:45 +02:00
committed by GitHub
co-authored by Karl Persson
parent d1df896962
commit e3501dfa4d
8 changed files with 97 additions and 2 deletions
+7 -2
View File
@@ -7,8 +7,9 @@ import (
)
type FakeOrgService struct {
ExpectedOrgUserID int64
ExpectedError error
ExpectedOrgUserID int64
ExpectedError error
ExpectedUserOrgDTO []*org.UserOrgDTO
}
func NewOrgServiceFake() *FakeOrgService {
@@ -30,3 +31,7 @@ func (f *FakeOrgService) InsertOrgUser(ctx context.Context, cmd *org.OrgUser) (i
func (f *FakeOrgService) DeleteUserFromAll(ctx context.Context, userID int64) error {
return f.ExpectedError
}
func (f *FakeOrgService) GetUserOrgList(ctx context.Context, query *org.GetUserOrgListQuery) ([]*org.UserOrgDTO, error) {
return f.ExpectedUserOrgDTO, f.ExpectedError
}