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

)
        
        selected_dag_ids = {unquote(dag_id) for dag_id in request.form.getlist("dag_ids") if dag_id}
        if selected_dag_ids:
            filter_dag_ids = selected_dag_ids.intersection(allowed_dag_ids)
        else:
            filter_dag_ids = allowed_dag_ids
        if not filter_dag_ids:
            return flask.json.jsonify({})
        dag_state_stats = dag_state_stats.filter(dr.dag_id.in_(filter_dag_ids))
        data: dict[str, dict[str, int]] = collections.defaultdict(dict)
        payload: dict[str, list[dict[str, Any]]] = collections.defaultdict(list)
        for dag_id, state, count in dag_state_stats:
            data[dag_id][state] = count
        for dag_id in filter_dag_ids:
            payload[dag_id] = []
            for state in State.dag_states:
                count = data.get(dag_id, {}).get(state, 0)
                payload[dag_id].append({"state": state, "count": count})
        return flask.json.jsonify(payload)
    @expose("/task_stats", methods=["POST"])
    @auth.has_access(
        [
            (permissions.ACTION_CAN_READ, permissions.RESOURCE_DAG),
            (permissions.ACTION_CAN_READ, permissions.RESOURCE_DAG_RUN),
            (permissions.ACTION_CAN_READ, permissions.RESOURCE_TASK_INSTANCE),
        ]
    )
    @provide_session
    def task_stats(self, session: Session = NEW_SESSION):