feat(helm/userrepos) fix getting global repo for ordinary users EE-1562 (#5567)

* feat(helm/userrepos) fix getting global repo for ordinary users EE-1562

* post review changes and further backported changes from EE
This commit is contained in:
Matt Hook
2021-09-02 14:34:22 +12:00
committed by zees-dev
parent 90b43feda8
commit bd9bd70d25
4 changed files with 22 additions and 23 deletions

View File

@@ -55,9 +55,9 @@ func NewHandler(bouncer *security.RequestBouncer, rateLimiter *security.RateLimi
h.Handle("/users/admin/init",
bouncer.PublicAccess(httperror.LoggerHandler(h.adminInit))).Methods(http.MethodPost)
h.Handle("/users/{id}/helm-repositories",
bouncer.RestrictedAccess(httperror.LoggerHandler(h.userGetHelmRepos))).Methods(http.MethodGet)
bouncer.AuthenticatedAccess(httperror.LoggerHandler(h.userGetHelmRepos))).Methods(http.MethodGet)
h.Handle("/users/{id}/helm-repositories",
bouncer.RestrictedAccess(httperror.LoggerHandler(h.userCreateHelmRepo))).Methods(http.MethodPost)
bouncer.AuthenticatedAccess(httperror.LoggerHandler(h.userCreateHelmRepo))).Methods(http.MethodPost)
return h
}