Fix errorcode for disabled registration (#8867)

The spec says we should return `M_FORBIDDEN` when someone tries to register and
registration is disabled.
This commit is contained in:
Richard van der Hoff 2020-12-03 15:41:19 +00:00 committed by GitHub
parent 66f75c5b74
commit cf3b8156be
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 1 deletions

View file

@ -121,6 +121,7 @@ class RegisterRestServletTestCase(unittest.HomeserverTestCase):
self.assertEquals(channel.result["code"], b"403", channel.result)
self.assertEquals(channel.json_body["error"], "Registration has been disabled")
self.assertEquals(channel.json_body["errcode"], "M_FORBIDDEN")
def test_POST_guest_registration(self):
self.hs.config.macaroon_secret_key = "test"