AccessControl: Fix locked role picker in orgs/edit page (#46539)

* AccessControl: Fix locked role picker in orgs/edit page

* Use correct org when computing metadata
This commit is contained in:
Gabriel MABILLE
2022-03-24 08:58:10 +01:00
committed by GitHub
parent a9b55f7905
commit 3440e7c8f7
7 changed files with 20 additions and 11 deletions

View File

@@ -46,7 +46,7 @@ func (hs *HTTPServer) getUserUserProfile(c *models.ReqContext, userID int64) res
query.Result.IsExternal = true
}
query.Result.AccessControl = hs.getAccessControlMetadata(c, "global.users:id:", strconv.FormatInt(userID, 10))
query.Result.AccessControl = hs.getAccessControlMetadata(c, c.OrgId, "global.users:id:", strconv.FormatInt(userID, 10))
query.Result.AvatarUrl = dtos.GetGravatarUrl(query.Result.Email)
return response.JSON(200, query.Result)