Users: clean up OrgId when all user orgs are removed (#46003)

* Clean up orgId when user organization is removed

* Add a test for removing user org

* Fix linting errors

* Update comment

* Fix linting errors

* Make removing user org more explicit
This commit is contained in:
Piotr Jamróz
2022-04-06 08:35:58 +02:00
committed by GitHub
parent f9d86557cf
commit 8490fd77e3
4 changed files with 64 additions and 1 deletions
+1 -1
View File
@@ -233,7 +233,7 @@ type UserProfileDTO struct {
Name string `json:"name"`
Login string `json:"login"`
Theme string `json:"theme"`
OrgId int64 `json:"orgId"`
OrgId int64 `json:"orgId,omitempty"`
IsGrafanaAdmin bool `json:"isGrafanaAdmin"`
IsDisabled bool `json:"isDisabled"`
IsExternal bool `json:"isExternal"`