Return suspended status when querying user account (#17952)
This commit is contained in:
parent
4c67d20af7
commit
4587decd67
|
@ -0,0 +1 @@
|
|||
Return whether the user is suspended when querying the user account in the Admin API.
|
|
@ -55,7 +55,8 @@ It returns a JSON body like the following:
|
|||
}
|
||||
],
|
||||
"user_type": null,
|
||||
"locked": false
|
||||
"locked": false,
|
||||
"suspended": false
|
||||
}
|
||||
```
|
||||
|
||||
|
|
|
@ -124,6 +124,7 @@ class AdminHandler:
|
|||
"consent_ts": user_info.consent_ts,
|
||||
"user_type": user_info.user_type,
|
||||
"is_guest": user_info.is_guest,
|
||||
"suspended": user_info.suspended,
|
||||
}
|
||||
|
||||
if self._msc3866_enabled:
|
||||
|
|
|
@ -3222,6 +3222,7 @@ class UserRestTestCase(unittest.HomeserverTestCase):
|
|||
self.assertIn("consent_ts", content)
|
||||
self.assertIn("external_ids", content)
|
||||
self.assertIn("last_seen_ts", content)
|
||||
self.assertIn("suspended", content)
|
||||
|
||||
# This key was removed intentionally. Ensure it is not accidentally re-included.
|
||||
self.assertNotIn("password_hash", content)
|
||||
|
|
Loading…
Reference in New Issue