bbovenzi commented on code in PR #23332:
URL: https://github.com/apache/airflow/pull/23332#discussion_r861065004
##########
airflow/www/templates/airflow/dag.html:
##########
@@ -82,6 +82,9 @@
{% endif %}
{% if external_log_name is defined %}
<meta name="external_log_name" content="{{ external_log_name }}">
+ {% if appbuilder.sm.can_edit_dag(dag.dag_id) %}
+ <meta name="can_edit" content="{{ appbuilder.sm.can_edit_dag(dag.dag_id) }}">
Review Comment:
Should I use that instead of the current meta `content`?
Also, what I meant is that a lot of these endpoints are checking multiple
permissions, not just dag.can_edit.
(ie:
[/clear](https://github.com/apache/airflow/blob/main/airflow/www/views.py#L2014))
```
@expose('/clear', methods=['POST'])
@auth.has_access(
[
(permissions.ACTION_CAN_EDIT, permissions.RESOURCE_DAG),
(permissions.ACTION_CAN_DELETE, permissions.RESOURCE_TASK_INSTANCE),
]
)
##########
airflow/www/templates/airflow/dag.html:
##########
@@ -82,6 +82,9 @@
{% endif %}
{% if external_log_name is defined %}
<meta name="external_log_name" content="{{ external_log_name }}">
+ {% if appbuilder.sm.can_edit_dag(dag.dag_id) %}
+ <meta name="can_edit" content="{{ appbuilder.sm.can_edit_dag(dag.dag_id) }}">
Review Comment:
Should I use that instead of the current meta `content`?
Also, what I meant is that a lot of these endpoints are checking multiple
permissions, not just dag.can_edit. (ie:
[/clear](https://github.com/apache/airflow/blob/main/airflow/www/views.py#L2014))
```
@expose('/clear', methods=['POST'])
@auth.has_access(
[
(permissions.ACTION_CAN_EDIT, permissions.RESOURCE_DAG),
(permissions.ACTION_CAN_DELETE, permissions.RESOURCE_TASK_INSTANCE),
]
)
--
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]