Add option to disable totp for everyone
This commit is contained in:
@ -213,11 +213,14 @@ func registerAPIRoutes(a *echo.Group) {
|
||||
u.GET("s", apiv1.UserList)
|
||||
u.POST("/token", apiv1.RenewToken)
|
||||
u.POST("/settings/email", apiv1.UpdateUserEmail)
|
||||
u.GET("/settings/totp", apiv1.UserTOTP)
|
||||
u.POST("/settings/totp/enroll", apiv1.UserTOTPEnroll)
|
||||
u.POST("/settings/totp/enable", apiv1.UserTOTPEnable)
|
||||
u.POST("/settings/totp/disable", apiv1.UserTOTPDisable)
|
||||
u.GET("/settings/totp/qrcode", apiv1.UserTOTPQrCode)
|
||||
|
||||
if config.ServiceEnableTotp.GetBool() {
|
||||
u.GET("/settings/totp", apiv1.UserTOTP)
|
||||
u.POST("/settings/totp/enroll", apiv1.UserTOTPEnroll)
|
||||
u.POST("/settings/totp/enable", apiv1.UserTOTPEnable)
|
||||
u.POST("/settings/totp/disable", apiv1.UserTOTPDisable)
|
||||
u.GET("/settings/totp/qrcode", apiv1.UserTOTPQrCode)
|
||||
}
|
||||
|
||||
listHandler := &handler.WebHandler{
|
||||
EmptyStruct: func() handler.CObject {
|
||||
|
Reference in New Issue
Block a user