To be able to fully manage the permissions in the UI we will need to be able to modify the roles and the permissions they have.

It probably makes sense to have one PR that adds CUD (Read is already done) endpoints for Roles.

Permissions are not createable via anything but code, so we only need these endpoints for Roles, but not Permissions.
airflow/api_connexion/endpoints/role_and_permission_endpoint.py
#
#
from flask import current_app
from flask_appbuilder.security.sqla.models import Permission, Role
from sqlalchemy import func
from airflow.api_connexion import security
from airflow.api_connexion.exceptions import NotFound
from airflow.api_connexion.parameters import apply_sorting, check_limit, format_parameters
from airflow.api_connexion.schemas.role_and_permission_schema import (
    ActionCollection,
    RoleCollection,
    action_collection_schema,
    role_collection_schema,
    role_schema,
)
from airflow.security import permissions
@security.requires_access([(permissions.ACTION_CAN_SHOW, permissions.RESOURCE_ROLE_MODEL_VIEW)])
def get_role(role_name):