mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-10-01 11:49:51 -04:00
rework format of change password capability
This commit is contained in:
parent
19259d903c
commit
e4bef9d470
@ -55,7 +55,9 @@ class CapabilitiesRestServlet(RestServlet):
|
||||
"state-v2-test": "unstable",
|
||||
}
|
||||
},
|
||||
"m.change_password": change_password,
|
||||
"m.change_password": {
|
||||
"enabled": change_password,
|
||||
},
|
||||
}
|
||||
})
|
||||
)
|
||||
|
@ -68,11 +68,11 @@ class CapabilitiesTestCase(unittest.HomeserverTestCase):
|
||||
self.assertEqual(channel.code, 200)
|
||||
|
||||
# Test case where password is handled outside of Synapse
|
||||
self.assertTrue(capabilities['m.change_password'])
|
||||
self.assertTrue(capabilities['m.change_password']['enabled'])
|
||||
self.get_success(self.store.user_set_password_hash(user, None))
|
||||
request, channel = self.make_request("GET", self.url, access_token=access_token)
|
||||
self.render(request)
|
||||
capabilities = channel.json_body['capabilities']
|
||||
|
||||
self.assertEqual(channel.code, 200)
|
||||
self.assertFalse(capabilities['m.change_password'])
|
||||
self.assertFalse(capabilities['m.change_password']['enabled'])
|
||||
|
Loading…
Reference in New Issue
Block a user