ephraimbuddy commented on PR #23510:
URL: https://github.com/apache/airflow/pull/23510#issuecomment-1119552140
> I wonder if we could have the `resource_name_for_dag` return multiple
resources, and then we check in turn util we find one of them?
>
> So `resource_name_for_dag("team.dag")` would return `["DAG:team.dag",
"DAG:team"]`?
>
> I don't know if that is "safe" to do. Possibly not, as _if_ both `team`
and `team.dag` are dags (but not subdags) and then you have access to `team` it
would "mistakenly" give you access to team.dag too.
Yeah, it makes the permission not to be very specific. The current code
solves it but there's a query each time we lookup a permission. It seems to be
the better solution among other things I considered.
--
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]