Merge branch 'dashboard-acl-ux2' of github.com:grafana/grafana into dashboard-acl-ux2

This commit is contained in:
Patrick O'Carroll 2018-04-06 09:50:36 +02:00
commit 0203e7afd5
2 changed files with 10 additions and 1 deletions

View File

@ -30,7 +30,10 @@ func GetDashboardPermissionList(c *m.ReqContext) Response {
for _, perm := range acl { for _, perm := range acl {
perm.UserAvatarUrl = dtos.GetGravatarUrl(perm.UserEmail) perm.UserAvatarUrl = dtos.GetGravatarUrl(perm.UserEmail)
perm.TeamAvatarUrl = dtos.GetGravatarUrl(perm.TeamEmail)
if perm.TeamId > 0 {
perm.TeamAvatarUrl = dtos.GetGravatarUrlWithDefault(perm.TeamEmail, perm.Team)
}
if perm.Slug != "" { if perm.Slug != "" {
perm.Url = m.GetDashboardFolderUrl(perm.IsFolder, perm.Uid, perm.Slug) perm.Url = m.GetDashboardFolderUrl(perm.IsFolder, perm.Uid, perm.Slug)
} }

View File

@ -33,6 +33,12 @@ func GetFolderPermissionList(c *m.ReqContext) Response {
perm.FolderId = folder.Id perm.FolderId = folder.Id
perm.DashboardId = 0 perm.DashboardId = 0
perm.UserAvatarUrl = dtos.GetGravatarUrl(perm.UserEmail)
if perm.TeamId > 0 {
perm.TeamAvatarUrl = dtos.GetGravatarUrlWithDefault(perm.TeamEmail, perm.Team)
}
if perm.Slug != "" { if perm.Slug != "" {
perm.Url = m.GetDashboardFolderUrl(perm.IsFolder, perm.Uid, perm.Slug) perm.Url = m.GetDashboardFolderUrl(perm.IsFolder, perm.Uid, perm.Slug)
} }