Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a way for the users to edit their accounts links for
Admins can edit any user's profile, and users can only edit their own profile.
related issue: #285 (without the email change part)
Some Notes
No Account Links in
RegisterOnly an Edit method is necessary. When the user registers, the user is created with no renku/github/linkedin information because Keycloak does not ask for those. It's the frontend job to redirect the user to a page where they'll enter the missing information and send an
Editrequest.No Validation of Github/Linkedin/Renku usernames
The backend validates that the URL has the right domain and format, but it doesn't check whether the user actually exists. It never sends a request to github/renku/linkedin. I did this on purpose for two reasons:
999to unauthenticated users. The backend having no linkedin account, it's not possible to tell whether a user exists or not.What I suggest instead: in the frontend edit form, show the cleaned-up link right away so the user can click it and confirm it's their profile. A user can see in a second whether the link is right, which no automated check can match.
The backend expects full URLs, not usernames
I think it would be nice if the frontend would let users enter only their renku/github/linkedin username as well as the full URL and adapt it to a proper URL before sending it to the backend. This would give more flexibility for the user. E.g. a user could enter either
bob-wonderlandorhttps://github.com/bob-wonderland/, both would be translated tohttps://github.com/bob-wonderlandbefore sending the request to the backend.I did not add this flexibility in the backend because I though it was important to make it explicit which websites the usernames were pointing to when sending them to the backend. I chose to use the full URLs instead of the usernames to avoid attention mistakes that are hard to debug (e.g. sending a github username
bob-wonderlandas a linkedin username). But let me know if you think that's wrong.