Permissions: Fix team and role permissions on folders/dashboards not displayed for non Grafana Admin users (#31132)

* Cfg: fix hidden users initialization

* add tests

* do not call isHiddenUser function for non-user permission

* do not call isHiddenUser function for non-user permission
This commit is contained in:
Agnès Toulet
2021-02-12 16:08:18 +01:00
committed by GitHub
parent 92ae019f8e
commit 7f1f559929
5 changed files with 92 additions and 4 deletions
+1 -1
View File
@@ -34,7 +34,7 @@ func (hs *HTTPServer) GetFolderPermissionList(c *models.ReqContext) response.Res
filteredAcls := make([]*models.DashboardAclInfoDTO, 0, len(acl))
for _, perm := range acl {
if dtos.IsHiddenUser(perm.UserLogin, c.SignedInUser, hs.Cfg) {
if perm.UserId > 0 && dtos.IsHiddenUser(perm.UserLogin, c.SignedInUser, hs.Cfg) {
continue
}