mirror of
https://github.com/grafana/grafana.git
synced 2026-07-30 00:08:10 -05:00
Permissions: Fix inherited folder permissions can prevent new permissions being added to a dashboard (#33329)
In the case permissions has been added on dashboard(s). Later permissions for the parent folder of the dashboard is edited in such a way that dashboard in that folder has a permission that is a duplicate of an inherited one. This PR changes so that duplicate permissions are now filtered out from /api/dashboards/id/<dashboard id>/permissions. Duplicate permission are not filtered out if the permission on dashboard is higher than on the inherited folder. Fixes #33296 Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
This commit is contained in:
co-authored by
Arve Knudsen
parent
6d95f2f1db
commit
7e6db1ee7e
@@ -24,7 +24,7 @@ func (hs *HTTPServer) GetDashboardPermissionList(c *models.ReqContext) response.
|
||||
return dashboardGuardianResponse(err)
|
||||
}
|
||||
|
||||
acl, err := g.GetAcl()
|
||||
acl, err := g.GetACLWithoutDuplicates()
|
||||
if err != nil {
|
||||
return response.Error(500, "Failed to get dashboard permissions", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user