mirror of
https://github.com/coder/coder.git
synced 2025-07-03 16:13:58 +00:00
feat: Add suspend/active user to cli (#1422)
* feat: Add suspend/active user to cli * UserID is now a string and allows for username too
This commit is contained in:
@ -239,7 +239,10 @@ func New(options *Options) (http.Handler, func()) {
|
||||
r.Use(httpmw.ExtractUserParam(options.Database))
|
||||
r.Get("/", api.userByName)
|
||||
r.Put("/profile", api.putUserProfile)
|
||||
r.Put("/suspend", api.putUserSuspend)
|
||||
r.Route("/status", func(r chi.Router) {
|
||||
r.Put("/suspend", api.putUserStatus(database.UserStatusSuspended))
|
||||
r.Put("/active", api.putUserStatus(database.UserStatusActive))
|
||||
})
|
||||
r.Route("/password", func(r chi.Router) {
|
||||
r.Use(httpmw.WithRBACObject(rbac.ResourceUserPasswordRole))
|
||||
r.Put("/", authorize(api.putUserPassword, rbac.ActionUpdate))
|
||||
|
Reference in New Issue
Block a user