sjyangkevin commented on code in PR #54043:
URL: https://github.com/apache/airflow/pull/54043#discussion_r2249278164
##########
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:
It is not yet ready, I will need to do some testing and write tests for it.
Just want to make sure I fully understand the requirements for this. I think we
want to make this new permission taking effect after and include 3.1.0 is that
correct?
--
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]