Skip to content

Commit

Permalink
Simplify action name retrieval in FAB auth manager (#39358)
Browse files Browse the repository at this point in the history
  • Loading branch information
jedcunningham authored May 2, 2024
1 parent 599f520 commit 959e52b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions airflow/providers/fab/auth_manager/fab_auth_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,10 +272,7 @@ def is_authorized_custom_view(
):
if not user:
user = self.get_user()
if method in get_fab_action_from_method_map():
fab_action_name = get_fab_action_from_method_map()[method]
else:
fab_action_name = method
fab_action_name = get_fab_action_from_method_map().get(method, method)
return (fab_action_name, resource_name) in self._get_user_permissions(user)

@provide_session
Expand Down

0 comments on commit 959e52b

Please sign in to comment.