Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an admin API to merge accounts #5514

Closed
scolapasta opened this issue Feb 5, 2019 · 4 comments
Closed

Add an admin API to merge accounts #5514

scolapasta opened this issue Feb 5, 2019 · 4 comments
Assignees
Milestone

Comments

@scolapasta
Copy link
Contributor

We want to add an admin API that can be used to merge two acounts (i.e. move one account into another). This would require changing foreign keys as well as dealing with the role assignment table.

@matthew-a-dunlap
Copy link
Contributor

I was hoping to get this done before my 2 weeks away from Dataverse, but it turned out to be a bit more complicated than I thought.

The code still needs tests and all the objects connected to the objects deleted in the command need to be altered. I'm not sure which need their foreign keys changed and which just need to be deleted. On friday Gustavo pointed me to https://github.com/IQSS/dataverse/blob/develop/scripts/migration/scrub_duplicate_emails.sql as reference for how we did this in the past but I didn't get to dig in. Specifically this part:

FROM information_schema.table_constraints tc
JOIN information_schema.key_column_usage kcu ON tc.constraint_name = kcu.constraint_name
JOIN information_schema.constraint_column_usage ccu ON ccu.constraint_name = tc.constraint_name
WHERE constraint_type = 'FOREIGN KEY' AND ccu.table_name='vdcuser';

It may be possible to manage this instead by using cascade inside java, investigating that was going to be my next step.

@matthew-a-dunlap matthew-a-dunlap removed their assignment Feb 25, 2019
@sekmiller sekmiller self-assigned this Feb 25, 2019
sekmiller added a commit that referenced this issue Mar 1, 2019
@djbrooke djbrooke added this to the 4.12 milestone Mar 1, 2019
@pdurbin pdurbin removed their assignment Mar 1, 2019
sekmiller added a commit that referenced this issue Mar 1, 2019
@sekmiller sekmiller mentioned this issue Mar 1, 2019
5 tasks
@sekmiller sekmiller removed their assignment Mar 1, 2019
@kcondon
Copy link
Contributor

kcondon commented Mar 15, 2019

I'll use this ticket to record both rename and merge issues.

  1. Renamed/merged user remains logged in if rename/merge happens while logged in. Generally harmless since cannot save a new dataset but can download public files without incrementing count or recording download in guestbookrepsonse.

[x] 2. Cannot log in to merged account. No error in logs but ui does not allow log in as if incorrect password. Was not able to reproduce.

[x] 3. Cannot merge an account with an open file access request into another, throws error.

[x] 4. Cannot merge an account with a group permission into another.

[x] 5. Cannot merge an oauth account into a builtin, error.

[x] 6. Cannot merge a shib user into a builtin, error.

[x] 7. Not sure of the rules around guestbook and renaming/merging. When merge 2 accounts that have downloaded the same file (no guestbook) download response still shows old account info.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants