-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Add PATCH to _MAP_METHOD_NAME_TO_FAB_ACTION_NAME #47138
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
Conversation
(cherry picked from commit 4860c34)
4860c34 to
7e9b9b6
Compare
pierrejeambrun
left a comment
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.
Yes required for the permissions on the server api. (there are some patch there)
|
cc: @vincbeck |
|
Why do we need both? What is the different between
If you want to add PATCH just because you have PATCH routes defined in the fastapi application I think this is wrong. We should then have a layer that translate fastapi method to auth manager action and convert PATCH to PUT in that layer |
This comment was marked as outdated.
This comment was marked as outdated.
|
There are some subtle differences (idempotency) I won't go into details and it depends on how we implement them, but both PUT and PATCH could be used in the rest API to update a resource. (For now we only have PATCH in the new server api). I think both http method PUT & PATCH should be mapped to the |
|
I understand this. What I am saying is, on the auth manager side, we do not need to have both, we do not need to say: "I want to give user X permissions for PUT but not for PATCH". Do we? On the auth manager side we should limit the number of actions and I dont think it is needed to add that new action. I dont think we need this granularity? |
|
We are not adding an action. We are mapping the PATCH HTTP method to the same existing Do you have an alternative in mind ?
This is exactly what is happening Maybe I missed something. |
|
No, you are adding a new method to You are right I think we are on the same page but I think this implementation is wrong. What we want to do is to translate HTTP method |
|
Ohhh, yes you are talking about I was focusing on Then I guess we can do the mapping on the fastapi side. So that Or don't do anything specific, and we keep things as they were. A patch endpoint will be decorated with a (Even if I admit this is confusing that every single other HTTP method got their counterpart |
|
Waiting for @vincbeck input but I think we will most likely close this one. |
|
💯 We are on the same page :) The two choices you listed are valid to me and I'll let you chose the best option |
related to #42360
related comment: #47062 (comment)