potiuk commented on code in PR #34317:
URL: https://github.com/apache/airflow/pull/34317#discussion_r1359507817


##########
airflow/auth/managers/fab/fab_auth_manager.py:
##########
@@ -65,22 +79,24 @@
         CLICommand,
     )
 
-_MAP_METHOD_NAME_TO_FAB_ACTION_NAME: dict[ResourceMethod, str] = {
+MAP_METHOD_NAME_TO_FAB_ACTION_NAME: dict[ResourceMethod, str] = {
     "POST": ACTION_CAN_CREATE,
     "GET": ACTION_CAN_READ,
     "PUT": ACTION_CAN_EDIT,
     "DELETE": ACTION_CAN_DELETE,
 }
 
-_MAP_DAG_ACCESS_ENTITY_TO_FAB_RESOURCE_TYPE = {
-    DagAccessEntity.AUDIT_LOG: RESOURCE_AUDIT_LOG,
-    DagAccessEntity.CODE: RESOURCE_DAG_CODE,
-    DagAccessEntity.DATASET: RESOURCE_DATASET,
-    DagAccessEntity.DEPENDENCIES: RESOURCE_DAG_DEPENDENCIES,
-    DagAccessEntity.RUN: RESOURCE_DAG_RUN,
-    DagAccessEntity.TASK_INSTANCE: RESOURCE_TASK_INSTANCE,
-    DagAccessEntity.TASK_LOGS: RESOURCE_TASK_LOG,
-    DagAccessEntity.XCOM: RESOURCE_XCOM,
+_MAP_DAG_ACCESS_ENTITY_TO_FAB_RESOURCE_TYPE: dict[DagAccessEntity, tuple[str, 
...]] = {
+    DagAccessEntity.AUDIT_LOG: (RESOURCE_AUDIT_LOG,),
+    DagAccessEntity.CODE: (RESOURCE_DAG_CODE,),
+    DagAccessEntity.DEPENDENCIES: (RESOURCE_DAG_DEPENDENCIES,),
+    DagAccessEntity.IMPORT_ERRORS: (RESOURCE_IMPORT_ERROR,),
+    DagAccessEntity.RUN: (RESOURCE_DAG_RUN,),
+    DagAccessEntity.TASK: (RESOURCE_TASK_INSTANCE,),

Review Comment:
   Maybe we should leave a coomment here  - that this is backwards 
compatibility due to originally wrong/misleading  use of `TASK_INSTANCE` in FAB 
permissions?



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