mirror of
https://mau.dev/maunium/synapse.git
synced 2024-11-17 15:31:19 +01:00
rework format of change password capability
This commit is contained in:
parent
19259d903c
commit
e4bef9d470
2 changed files with 5 additions and 3 deletions
|
@ -55,7 +55,9 @@ class CapabilitiesRestServlet(RestServlet):
|
||||||
"state-v2-test": "unstable",
|
"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)
|
self.assertEqual(channel.code, 200)
|
||||||
|
|
||||||
# Test case where password is handled outside of Synapse
|
# 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))
|
self.get_success(self.store.user_set_password_hash(user, None))
|
||||||
request, channel = self.make_request("GET", self.url, access_token=access_token)
|
request, channel = self.make_request("GET", self.url, access_token=access_token)
|
||||||
self.render(request)
|
self.render(request)
|
||||||
capabilities = channel.json_body['capabilities']
|
capabilities = channel.json_body['capabilities']
|
||||||
|
|
||||||
self.assertEqual(channel.code, 200)
|
self.assertEqual(channel.code, 200)
|
||||||
self.assertFalse(capabilities['m.change_password'])
|
self.assertFalse(capabilities['m.change_password']['enabled'])
|
||||||
|
|
Loading…
Reference in a new issue