Lee-W commented on code in PR #54043:
URL: https://github.com/apache/airflow/pull/54043#discussion_r2249529871


##########
providers/fab/src/airflow/providers/fab/auth_manager/fab_auth_manager.py:
##########
@@ -340,14 +342,30 @@ def is_authorized_dag(
             method=dag_method, details=details, user=user
         ):
             return False
-
+        
+        # return all(
+        #     (
+        #         self._is_authorized(method=method, 
resource_type=resource_type, user=user)
+        #         if resource_type != RESOURCE_DAG_RUN or not 
hasattr(permissions, "resource_name")
+        #         else self._is_authorized_dag_run(method=method, 
details=details, user=user)
+        #     )
+        #     for resource_type in resource_types
+        # )
+
+        # if Airflow version is less than 3.1.0 and the resource type is 
RESOURCE_HITL_DETAIL, skip.
         return all(
             (
-                self._is_authorized(method=method, 
resource_type=resource_type, user=user)
-                if resource_type != RESOURCE_DAG_RUN or not 
hasattr(permissions, "resource_name")
-                else self._is_authorized_dag_run(method=method, 
details=details, user=user)
-            )
-            for resource_type in resource_types
+                True
+                if (
+                    resource_type == RESOURCE_HITL_DETAIL
+                    and 
packaging.version.parse(packaging.version.parse(airflow_version).base_version) 
< packaging.version.parse("3.1.0")

Review Comment:
   Yes, but I think we probably would like to make it higher than 3.1.0 ?



-- 
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: commits-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to