-
Notifications
You must be signed in to change notification settings - Fork 0
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
PB-1109: Add PUT endpoint to update user #37
Merged
asteiner-swisstopo
merged 10 commits into
develop
from
feat-PB-1109-update-user-endpoint
Nov 13, 2024
Merged
PB-1109: Add PUT endpoint to update user #37
asteiner-swisstopo
merged 10 commits into
develop
from
feat-PB-1109-update-user-endpoint
Nov 13, 2024
Conversation
This file contains 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
msom
reviewed
Nov 6, 2024
msom
approved these changes
Nov 6, 2024
schtibe
approved these changes
Nov 11, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just small comments, looking good otherwise 👍
asteiner-swisstopo
force-pushed
the
feat-PB-1109-update-user-endpoint
branch
from
November 12, 2024 15:44
76f04e1
to
e0767b0
Compare
boecklic
approved these changes
Nov 13, 2024
This makes it clear that the client can act on this by changing the provider ID: This does not use Http404 as Http404 ignores custom exception messages.
asteiner-swisstopo
force-pushed
the
feat-PB-1109-update-user-endpoint
branch
from
November 13, 2024 10:34
ed63b04
to
b977208
Compare
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.
Adds PUT endpoint
users/{username}
to the the REST API of service-control that allows you to update a user.Summary of changes:
Add new PUT endpoint
users/{username}
that returns HTTP status codeℹ️ This uses PUT and not PATCH because we deem it good enough to start with and it's supposedly easier to implement. It's a bit annoying maybe that the user has to specify all fields, even those she/he does not want to change. But then again they can those values via the GET.
Rename
cognito.utils.user.update_user
toupdate_cognito_user
to put more clearly indicate that this is about Cognito and not about the User model in Django. See the discussion in Add DELETE endpoint for users #34.Example payload to PUT
users/{username}
:Example response if provider does not exist: