Browse Source

Fix registration error when disabled

master
Neil Alexander 3 months ago
parent
commit
a9faa1bc44
No known key found for this signature in database GPG Key ID: A02A2019A2BB0944
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      clientapi/routing/register.go

+ 4
- 1
clientapi/routing/register.go View File

@ -614,7 +614,10 @@ func handleRegistrationFlow(
}
if cfg.RegistrationDisabled && r.Auth.Type != authtypes.LoginTypeSharedSecret {
return util.MessageResponse(http.StatusForbidden, "Registration has been disabled")
return util.JSONResponse{
Code: http.StatusForbidden,
JSON: jsonerror.Forbidden("Registration is disabled"),
}
}
// Make sure normal user isn't registering under an exclusive application


Loading…
Cancel
Save