add display_name field to users and use user_id as unique identifier#1722
add display_name field to users and use user_id as unique identifier#1722
Conversation
|
Pending elaboration on #1689 (comment), this seems to align with much of #1689 |
d11d369 to
1674d40
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1722 +/- ##
==========================================
+ Coverage 83.35% 83.55% +0.19%
==========================================
Files 97 97
Lines 4837 4853 +16
Branches 500 496 -4
==========================================
+ Hits 4032 4055 +23
+ Misses 671 667 -4
+ Partials 134 131 -3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
0be5b73 to
07c7b77
Compare
benoit74
left a comment
There was a problem hiding this comment.
LGTM, one minor fix and you can merge.
I'm not satisfied anymore at all by the user screens, but let's move this topic to a distinct issue, this PR already achieves what we need to be able to handle (way beyond what was originally foreseen in the issue description), and UI rearrangement is more a detail.
Before merging, can you double check we will not break any "running" thing due to API change (besides the frontend which will have to be updated as soon as API is updated of course, I'm more thinking about workers and tasks). I don't think so, but I prefer to ask ^^
Yup. Nothing should break. There's no logic to change token decoding or key authentication with SSH (so long as workers have username since that's used in generating the auth message). Tested locally with a new task and everything works fine. |
6497674 to
f1a783d
Compare
Rationale
This PR refactors the API/UI to use both the username and id to perform actions on user views. Since Ory integration, users can have names which are similar to existing users (registered locally) and this would result in a unique constraint violation. To mitigate this, a new column
display_nameis added to the DB and API responses. This field is not unique and serves as a place to store the names coming from Ory and the locally registered users. For local users, the display name is generally the same as the username.Changes
This closes #1689