Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Follow-up to admin API to re-activate accounts #7908

Merged
merged 5 commits into from
Jul 22, 2020
Merged

Conversation

clokep
Copy link
Member

@clokep clokep commented Jul 20, 2020

A follow-up to #7847 (which fixed #7220) to fix a couple of bugs, now the re-activated user is:

  • Re-added to the user directory.
  • Removed from the erased_users table.

@clokep clokep requested a review from a team July 20, 2020 12:30
@clokep
Copy link
Member Author

clokep commented Jul 20, 2020

CC @dklimpel -- hopefully this meets all your feedback!

@clokep clokep mentioned this pull request Jul 20, 2020
@dklimpel
Copy link
Contributor

CC @dklimpel -- hopefully this meets all your feedback!

Yes, it does.

Copy link
Member

@anoadragon453 anoadragon453 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm otherwise!

synapse/handlers/deactivate_account.py Show resolved Hide resolved
@clokep clokep merged commit 13d7746 into develop Jul 22, 2020
@clokep clokep deleted the clokep/re-activate branch July 22, 2020 16:33
@JOJ0
Copy link

JOJ0 commented Oct 14, 2020

Hi, sorry to hijack this thread. How would I use this feature to re-activate an account? What is the API endpoint to send the request to? It's pretty urgent as I accidentally deactivated my main-account on my homeserver while playing around with my API shellscripts. I still have another admin account to send to the API.

I tried curls against endpoint addresses like this but no luck so far. Couldn't find it in the code either....didn't search extensively though....

https://my-hs.fqdn/_matrix/client/r0/admin/activate/%40${USER}%3Amy-hs.fqdn?access_token=${TOKEN}"

@clokep
Copy link
Member Author

clokep commented Oct 14, 2020

Please ask support questions in #synapse:matrix.org, but you might want to check the docs first: https://github.com/matrix-org/synapse/blob/master/docs/admin_api/user_admin_api.rst#create-or-modify-account

@localguru
Copy link
Contributor

@clokep @anoadragon453 Hi, I reactivated a User using

curl --header "Authorization: Bearer ${ACCESS_TOKEN}" -XPUT -d \
    '{"deactivated": false, "password": "test"}' \
    http://localhost:8008/_synapse/admin/v2/users/${MATRIX_ID}

but the user is still in erased_table. After an hour the entry was gone. Didn't restart the server.

@mloskot
Copy link

mloskot commented May 20, 2021

@clokep

Please ask support questions in #synapse:matrix.org, but you might want to check the docs first: https://github.com/matrix-org/synapse/blob/master/docs/admin_api/user_admin_api.rst#create-or-modify-account

FYI, and @JOJ0 too , this is not possible. I've issued request to the support team and here is what I have received:

Hi Mateusz

Unfortunately it is impossible to verify the identity of deleted users. Per the matrix.org Privacy Notice ( https://matrix.org/legal/privacy-notice#2211-account-and-profile-information ): "Your username is stored indefinitely to avoid account recycling."

To protect the security and privacy of our users we never reactivate or release deleted usernames.
We recommend you create a new account using a different Matrix ID.

Best wishes
Matrix.org Support

Bummer!

babolivier pushed a commit that referenced this pull request Sep 1, 2021
* commit '13d77464c':
  Follow-up to admin API to re-activate accounts (#7908)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reactivate an account
6 participants