Skip to content
Snippets Groups Projects
Verified Commit 6b27478c authored by Ernesto Rico Schmidt's avatar Ernesto Rico Schmidt
Browse files

feat: list all the imports running

parent 154a18e0
No related branches found
No related tags found
No related merge requests found
......@@ -54,14 +54,15 @@ func (api *API) ListImportsOfShow(c *gin.Context) {
}
}
} else {
if authorized, sess := authorizeRequestPrivilegedOrEntitled(c); !authorized {
return
} else {
if sess.Privileged {
showIDs = sess.PublicShows
s := getAuthSession(c.Request)
if s != nil {
shows, err := api.store.ListShows()
if err != nil {
c.JSON(http.StatusInternalServerError, ErrorResponse{Error: err.Error()})
return
}
if sess.Entitled {
showIDs = sess.Shows
for _, show := range shows {
showIDs = append(showIDs, show.ID)
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment