willyyang commented on issue #51325:
URL: https://github.com/apache/airflow/issues/51325#issuecomment-2941393918

   Thanks folks, I believe we need to change the following 
https://github.com/apache/airflow/blob/6846a480a79ba978e7755366e658e96a683a48b8/providers/fab/src/airflow/providers/fab/auth_manager/fab_auth_manager.py#L563-L568
   
   and 
   
   
https://github.com/apache/airflow/blob/6846a480a79ba978e7755366e658e96a683a48b8/providers/fab/src/airflow/providers/fab/auth_manager/fab_auth_manager.py#L589-L594
   
   to 
   ```
   if details and details.id:
       # Check whether the user has permissions to access a specific DAG
       resource_dag_name = permissions.resource_name(details.id, RESOURCE_DAG)
       return self._is_authorized(method=method, 
resource_type=resource_dag_name, user=user)
   
   else:
       authorized_dags = self.get_authorized_dag_ids(user=user, method=method)
       return len(authorized_dags) > 0
   ```
   
   I patched over the code and this change seems to work. 


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