Skip to content

Commit 959e52b

Browse files
Simplify action name retrieval in FAB auth manager (#39358)
1 parent 599f520 commit 959e52b

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

airflow/providers/fab/auth_manager/fab_auth_manager.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -272,10 +272,7 @@ def is_authorized_custom_view(
272272
):
273273
if not user:
274274
user = self.get_user()
275-
if method in get_fab_action_from_method_map():
276-
fab_action_name = get_fab_action_from_method_map()[method]
277-
else:
278-
fab_action_name = method
275+
fab_action_name = get_fab_action_from_method_map().get(method, method)
279276
return (fab_action_name, resource_name) in self._get_user_permissions(user)
280277

281278
@provide_session

0 commit comments

Comments
 (0)