ydsakshi commented on code in PR #75673:
URL: https://github.com/apache/airflow/pull/75673#discussion_r4654422461


##########
airflow-core/src/airflow/api_fastapi/core_api/security.py:
##########
@@ -315,8 +315,24 @@ def to_orm(self, select: Select) -> Select:
 class PermittedDagWarningFilter(PermittedDagFilter):
     """A parameter that filters the permitted dag warnings for the user."""
 
-    def to_orm(self, select: Select) -> Select:
-        return select.where(DagWarning.dag_id.in_(self.value or set()))
+    def to_orm(self, statement: Select) -> Select:
+        authorized = self.value or set()
+        readable_files = (
+            select(DagModel.bundle_name, DagModel.relative_fileloc)
+            .where(DagModel.dag_id.in_(authorized))
+            .distinct()
+        )
+        return statement.where(
+            or_(
+                DagWarning.dag_id.in_(authorized),

Review Comment:
   Fair observation, understood the concern.
   Will it be fine to take this up in a quick follow-up PR ?



-- 
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]

Reply via email to