Skip to content

Commit

Permalink
feat: add RBAC to manager config interface (dragonflyoss#1179)
Browse files Browse the repository at this point in the history
Signed-off-by: Gaius <[email protected]>
  • Loading branch information
gaius-qi authored Mar 23, 2022
1 parent e5e175c commit eb44965
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions manager/router/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,10 +197,10 @@ func Init(cfg *config.Config, logDir string, service service.Service, enforcer *

// Config
config := apiv1.Group("/configs")
config.POST("", h.CreateConfig)
config.DELETE(":id", h.DestroyConfig)
config.PATCH(":id", h.UpdateConfig)
config.GET(":id", h.GetConfig)
config.POST("", h.CreateConfig, jwt.MiddlewareFunc(), rbac)
config.DELETE(":id", h.DestroyConfig, jwt.MiddlewareFunc(), rbac)
config.PATCH(":id", h.UpdateConfig, jwt.MiddlewareFunc(), rbac)
config.GET(":id", h.GetConfig, jwt.MiddlewareFunc(), rbac)
config.GET("", h.GetConfigs)

// Job
Expand Down

0 comments on commit eb44965

Please sign in to comment.