vincbeck commented on code in PR #59564: URL: https://github.com/apache/airflow/pull/59564#discussion_r2661815228
########## airflow-core/src/airflow/api_fastapi/auth/managers/base_auth_manager.py: ########## @@ -75,7 +75,7 @@ # List of methods (or actions) a user can do against a resource ResourceMethod = Literal["GET", "POST", "PUT", "DELETE"] # Extends ``ResourceMethod`` to include "MENU". The method "MENU" is only supported with specific resources (menu items) -ExtendedResourceMethod = Literal["GET", "POST", "PUT", "DELETE", "MENU"] +ExtendedResourceMethod = Literal["GET", "POST", "PUT", "DELETE", "MENU", "PATCH"] Review Comment: We should not do that. `ExtendedResourceMethod` list all methods used by the auth managers to define user access to resources. `PATCH` is not used, they use `PUT` instead. Looking at the issue, what we should do is, update `_MAP_METHOD_NAME_TO_FAB_ACTION_NAME` to accept `str` as opposed to `ExtendedResourceMethod` as key and add `"PATCH": ACTION_CAN_EDIT,` as a new item in the dict. Since the method can be realistically any HTTP method, we should not limit it to `ExtendedResourceMethod` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
