vincbeck commented on code in PR #33213: URL: https://github.com/apache/airflow/pull/33213#discussion_r1334485212
########## airflow/www/views.py: ########## @@ -1313,23 +1290,12 @@ def last_dagruns(self, session: Session = NEW_SESSION): return flask.json.jsonify(resp) @expose("/code") - @auth.has_access( - [ - (permissions.ACTION_CAN_READ, permissions.RESOURCE_DAG), - (permissions.ACTION_CAN_READ, permissions.RESOURCE_DAG_CODE), - ] - ) def legacy_code(self): """Redirect from url param.""" return redirect(url_for("Airflow.code", **sanitize_args(request.args))) @expose("/dags/<string:dag_id>/code") - @auth.has_access( - [ - (permissions.ACTION_CAN_READ, permissions.RESOURCE_DAG), - (permissions.ACTION_CAN_READ, permissions.RESOURCE_DAG_CODE), - ] - ) + @auth.has_access_dag("GET", DagAccessEntity.CODE) Review Comment: See comment [here](https://github.com/apache/airflow/pull/33213#discussion_r1318202392). Basically we decided to go with `Literal` instead of `enum`. -- 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