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:
co-authored by
Karl Persson
parent
d1df896962
commit
e3501dfa4d
@@ -61,6 +61,16 @@ type GetOrgIDForNewUserCommand struct {
|
||||
SkipOrgSetup bool
|
||||
}
|
||||
|
||||
type GetUserOrgListQuery struct {
|
||||
UserID int64
|
||||
}
|
||||
|
||||
type UserOrgDTO struct {
|
||||
OrgID int64 `json:"orgId"`
|
||||
Name string `json:"name"`
|
||||
Role RoleType `json:"role"`
|
||||
}
|
||||
|
||||
func (r RoleType) IsValid() bool {
|
||||
return r == RoleViewer || r == RoleAdmin || r == RoleEditor
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user