Skip to content

Commit

Permalink
separate auth roles for downloading current FV and historic FVs
Browse files Browse the repository at this point in the history
  • Loading branch information
drewda committed Oct 30, 2023
1 parent 32594ad commit ec08e89
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/rest/rest.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,14 @@ func NewServer(cfg config.Config, srv http.Handler) (http.Handler, error) {
r.HandleFunc("/feeds", feedHandler)
r.HandleFunc("/feeds/{feed_key}.{format}", feedHandler)
r.HandleFunc("/feeds/{feed_key}", feedHandler)
r.HandleFunc("/feeds/{feed_key}/download_latest_feed_version", makeHandlerFunc(restcfg, "feedVersionDownloadLatest", feedVersionDownloadLatestHandler))
r.HandleFunc("/feeds/{feed_key}/download_latest_feed_version", ancheck.RoleRequired("tl_download_fv_current")(makeHandlerFunc(restcfg, "feedVersionDownloadLatest", feedVersionDownloadLatestHandler)))

r.HandleFunc("/feed_versions.{format}", feedVersionHandler)
r.HandleFunc("/feed_versions", feedVersionHandler)
r.HandleFunc("/feed_versions/{feed_version_key}.{format}", feedVersionHandler)
r.HandleFunc("/feed_versions/{feed_version_key}", feedVersionHandler)
r.HandleFunc("/feeds/{feed_key}/feed_versions", feedVersionHandler)
r.Handle("/feed_versions/{feed_version_key}/download", ancheck.RoleRequired("tl_user_pro")(makeHandlerFunc(restcfg, "feedVersionDownload", feedVersionDownloadHandler)))
r.Handle("/feed_versions/{feed_version_key}/download", ancheck.RoleRequired("tl_download_fv_historic")(makeHandlerFunc(restcfg, "feedVersionDownload", feedVersionDownloadHandler)))

r.HandleFunc("/agencies.{format}", agencyHandler)
r.HandleFunc("/agencies", agencyHandler)
Expand Down

0 comments on commit ec08e89

Please sign in to comment.