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 Admin API to change a username #5515

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

Add Admin API to change a username #5515

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

Comments

@scolapasta
Copy link
Contributor

We want to add an admin API that can be used to change an account's username. This would require dealing with the role assignment table and the actionlogrecord, but other connections (like creator id, etc) should be accounted for by foreign keys.

@pdurbin
Copy link
Member

pdurbin commented Feb 12, 2019

The specific SQL update statements can be found at #1445 (comment)

We will, of course, want all SQL updates to happen in a single transaction. I'm actually not sure how to accomplish this. I'm interesting in learning because I feel like there are occasions when only some SQL statements are run, leaving "bad data" in the database from partially completed actions. I assume it's some EJB magic?

@matthew-a-dunlap matthew-a-dunlap self-assigned this Feb 19, 2019
matthew-a-dunlap pushed a commit that referenced this issue Feb 20, 2019
The roleAssignments need to be changed.
matthew-a-dunlap pushed a commit that referenced this issue Feb 21, 2019
Without this submitting an invalid username (e.g. 'a') would cause a messy 500 error.
@matthew-a-dunlap matthew-a-dunlap removed their assignment Feb 21, 2019
matthew-a-dunlap pushed a commit that referenced this issue Feb 22, 2019
matthew-a-dunlap added a commit that referenced this issue Mar 12, 2019
Also unify the two commands to both log the change message as the old user. This is somewhat required for changeIdentifier as there is no other user object to populate the log method, and its not worth creating a new path for this case.
@matthew-a-dunlap matthew-a-dunlap removed their assignment Mar 12, 2019
@matthew-a-dunlap
Copy link
Contributor

matthew-a-dunlap commented Mar 12, 2019

The branch for this issue was combined with #5514 as they both needed the same changes to actionLogRecord. Please refer to the new PR for future review #5626

@kcondon
Copy link
Contributor

kcondon commented Mar 19, 2019

see #5514 for a list of issues for both merge and rename.

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

7 participants