Replace Read Only Editor role with ViewersCanEdit setting (#10166)

* removes readonly editor role

* adds viewersCanEdit setting

This enable you to allow viewers to edit/inspect
dashboards in grafana in their own browser without
allowing them to save dashboards

* remove read only editor option from all dropdowns

* migrates all read only viewers to viewers

* docs: replace readOnlyEditor with viewersCanEdit
This commit is contained in:
Carl Bergquist
2017-12-13 18:53:42 +01:00
committed by Torkel Ödegaard
parent dfde6e75ed
commit 35106537f2
13 changed files with 34 additions and 17 deletions

View File

@@ -182,7 +182,7 @@ func PostDashboard(c *middleware.Context, cmd m.SaveDashboardCommand) Response {
}
func canEditDashboard(role m.RoleType) bool {
return role == m.ROLE_ADMIN || role == m.ROLE_EDITOR || role == m.ROLE_READ_ONLY_EDITOR
return role == m.ROLE_ADMIN || role == m.ROLE_EDITOR || setting.ViewersCanEdit
}
func GetHomeDashboard(c *middleware.Context) Response {