pierrejeambrun commented on code in PR #72909:
URL: https://github.com/apache/airflow/pull/72909#discussion_r3988223136
##########
providers/fab/src/airflow/providers/fab/auth_manager/fab_auth_manager.py:
##########
@@ -186,6 +186,14 @@
if hasattr(MenuItem, "DEADLINES"):
_MAP_MENU_ITEM_TO_FAB_RESOURCE_TYPE[MenuItem.DEADLINES] = RESOURCE_DAG_RUN
+# Dag bundle visibility rides on Dag access -- a bundle is shown to a user who
can read a Dag that
+# came from it -- so the menu entry is gated the same way the Dags entry is.
Without a mapping the
+# lookup below falls back to the raw enum value as a resource name, and unlike
"Jobs" or "Providers"
+# (whose enum values happen to equal an existing FAB resource) no "Dag
Bundles" resource exists, so
+# the entry would silently vanish for every FAB deployment.
+if hasattr(MenuItem, "DAG_BUNDLES"):
+ _MAP_MENU_ITEM_TO_FAB_RESOURCE_TYPE[MenuItem.DAG_BUNDLES] = RESOURCE_DAG
Review Comment:
sounds good.
--
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]