Viewers with viewers_can_edit should be able to access /explore (#15787)

* fix: Viewers with viewers_can_edit should be able to access /explore #15773

* refactoring initial PR a bit to simplify function and reduce duplication

(cherry picked from commit a81d5486b0)
This commit is contained in:
Johannes Schill
2019-03-06 14:18:22 +01:00
committed by Torkel Ödegaard
parent eff00e8cc4
commit 94e21de199
2 changed files with 8 additions and 2 deletions
+1 -1
View File
@@ -73,7 +73,7 @@ func (hs *HTTPServer) registerRoutes() {
r.Get("/dashboards/", reqSignedIn, hs.Index)
r.Get("/dashboards/*", reqSignedIn, hs.Index)
r.Get("/explore", reqEditorRole, hs.Index)
r.Get("/explore", reqSignedIn, middleware.EnsureEditorOrViewerCanEdit, hs.Index)
r.Get("/playlists/", reqSignedIn, hs.Index)
r.Get("/playlists/*", reqSignedIn, hs.Index)