Skip to content

POST /_synapse/mas/delete_user always triggers deactivations as self-deactivations, despite MAS Admin API being used #19721

@reivilibre

Description

@reivilibre

As at v1.151.0

MasDeleteUserResource has:

        await self.deactivate_account_handler.deactivate_account(
            user_id=user_id.to_string(),
            erase_data=body.erase,
            requester=create_requester(user_id=user_id), # <---
        )

The marked line makes the deactivation trigger as a self-deactivation, even though it could have been requested by an administrator in MAS.

We should also set by_admin properly.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions