Deleting a user

82 views
Skip to first unread message

ofu...@gmail.com

unread,
Dec 9, 2015, 8:07:24 AM12/9/15
to Dataverse Users Community
Hi,
Can Dataverse admin delete a user in a Dataverse instance? Or can it be done via db?

Regards
Ofuuzo

Philip Durbin

unread,
Dec 9, 2015, 9:24:24 AM12/9/15
to dataverse...@googlegroups.com
It's possible to delete a user via the "admin" API but it isn't documented at http://guides.dataverse.org/en/4.2.1/api/native-api.html#admin

I think it isn't documented because we only use it for testing and don't believe it's recommended*. Generally, I go and delete everything the user has touched before I delete a user. Otherwise, you can't delete the user because it created something or was assigned permission to something.

Here's an example with curl:

curl -X DELETE http://localhost:8080/api/admin/authenticatedUsers/jdoe

Here's a related issue: User account cannot be disabled/deactivated - https://github.com/IQSS/dataverse/issues/2419

I hope this helps. I wouldn't recommend doing it through the database.

Phil

* Here's what the Javadoc says at https://github.com/IQSS/dataverse/blob/v4.2.1/src/main/java/edu/harvard/iq/dataverse/authorization/AuthenticationServiceBean.java#L203

Use with care! This method was written primarily for developers interested in API testing who want to:

1. Create a temporary user and get an API token.

2. Do some work with that API token.

3. Delete all the stuff that was created with the API token.

4. Delete the temporary user.

Before calling this method, make sure you've deleted all the stuff tied to the user, including stuff they've created, role assignments, group assignments, etc. Longer term, the intention is to have a "disableAuthenticatedUser" method/command.


--
You received this message because you are subscribed to the Google Groups "Dataverse Users Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dataverse-commu...@googlegroups.com.
To post to this group, send email to dataverse...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dataverse-community/e3e50377-fa4f-4787-b963-a3eda7e22ec3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Reply all
Reply to author
Forward
0 new messages