### Apache Airflow version

main (development)

### What happened

Only users with the role `Admin` are allowed to use the action clear on the TaskInstance list view.

### What you think should happen instead

Users with role `User` should be able to clear task instance in the Task Instance page.

### How to reproduce

Try to clear Task instance while using a user with a `User` role.

### Operating System

Fedora 37

### Versions of Apache Airflow Providers

_No response_

### Deployment

Official Apache Airflow Helm Chart

### Deployment details

_No response_

### Anything else

_No response_

### Are you willing to submit PR?

- [X] Yes I am willing to submit a PR!

### Code of Conduct

- [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)

"""Dag Code."""
        dag = get_airflow_app().dag_bag.get_dag(dag_id, session=session)
        dag_model = DagModel.get_dagmodel(dag_id, session=session)
        if not dag or not dag_model:
            flash(f'DAG "{dag_id}" seems to be missing.', "error")
            return redirect(url_for("Airflow.index"))
        wwwutils.check_import_errors(dag_model.fileloc, session)
        wwwutils.check_dag_warnings(dag_model.dag_id, session)
        try:
            code = DagCode.get_code_by_fileloc(dag_model.fileloc)
            html_code = Markup(highlight(code, lexers.PythonLexer(), HtmlFormatter(linenos=True)))
        except Exception as e:
            error = f"Exception encountered during dag code retrieval/code highlighting:\n\n{e}\n"
            html_code = Markup("<p>Failed to load DAG file Code.</p><p>Details: {}</p>").format(escape(error))
        return self.render_template(
            "airflow/dag_code.html",
            html_code=html_code,
            dag=dag,
            dag_model=dag_model,
            title=dag_id,
            root=request.args.get("root"),
            wrapped=conf.getboolean("webserver", "default_wrap"),
        )
    @expose("/dag_details")