mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-01 04:46:04 -04:00
Feature: Add deactivate account admin API
Allows server admins to "deactivate" accounts, which: - Revokes all access tokens - Removes all threepids - Removes password The API is a POST to `/admin/deactivate/<user_id>`
This commit is contained in:
parent
aac546c978
commit
f328d95cef
3 changed files with 40 additions and 0 deletions
|
@ -807,6 +807,11 @@ class SQLBaseStore(object):
|
|||
if txn.rowcount > 1:
|
||||
raise StoreError(500, "more than one row matched")
|
||||
|
||||
def _simple_delete(self, table, keyvalues, desc):
|
||||
return self.runInteraction(
|
||||
desc, self._simple_delete_txn, table, keyvalues
|
||||
)
|
||||
|
||||
@staticmethod
|
||||
def _simple_delete_txn(txn, table, keyvalues):
|
||||
sql = "DELETE FROM %s WHERE %s" % (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue