Skip to content

Commit

Permalink
Dont allow user to edit cnsi when admin_only (4876)
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Quandt <[email protected]>
  • Loading branch information
thquad authored and richard-cox committed Apr 16, 2021
1 parent e1fa11c commit 4de9dec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/jetstream/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -1123,7 +1123,7 @@ func (p *portalProxy) registerRoutes(e *echo.Echo, needSetupMiddleware bool) {
// static html will be returned instead. That's why we use the path ""
stableEndpointAdminAPIGroup := stableAdminAPIGroup.Group("")

if p.GetConfig().UserEndpointsEnabled != config.UserEndpointsConfigEnum.Disabled {
if p.GetConfig().UserEndpointsEnabled == config.UserEndpointsConfigEnum.Enabled {
stableEndpointAdminAPIGroup.Use(p.endpointAdminMiddleware)
stableEndpointAdminAPIGroup.POST("/endpoints", p.pluginRegisterRouter)
// Use middleware in route directly, because documentation is faulty
Expand Down

0 comments on commit 4de9dec

Please sign in to comment.