Skip to content
Snippets Groups Projects
Commit e4bef9d4 authored by Neil Johnson's avatar Neil Johnson
Browse files

rework format of change password capability

parent 19259d90
No related branches found
No related tags found
No related merge requests found
......@@ -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'])
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment