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
+2 -1
View File
@@ -150,7 +150,8 @@ func (hs *HTTPServer) getOrgUsersHelper(c *models.ReqContext, query *models.GetO
filteredUsers = append(filteredUsers, user)
}
accessControlMetadata := hs.getMultiAccessControlMetadata(c, "users:id:", userIDs)
// Get accesscontrol metadata for users in the target org
accessControlMetadata := hs.getMultiAccessControlMetadata(c, query.OrgId, "users:id:", userIDs)
if len(accessControlMetadata) > 0 {
for i := range filteredUsers {
filteredUsers[i].AccessControl = accessControlMetadata[fmt.Sprint(filteredUsers[i].UserId)]