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.
tests/api_connexion/endpoints/test_role_and_permission_endpoint.py
def test_should_response_200(self):
        response = self.client.get("/api/v1/roles", environ_overrides={'REMOTE_USER': "test"})
        assert response.status_code == 200
        existing_roles = set(EXISTING_ROLES)
        existing_roles.update(['Test', 'TestNoPermissions'])
        assert response.json['total_entries'] == len(existing_roles)
        roles = {role['name'] for role in response.json['roles']}
        assert roles == existing_roles
    def test_should_raises_401_unauthenticated(self):
        response = self.client.get("/api/v1/roles")
        assert_401(response)
    def test_should_raises_400_for_invalid_order_by(self):
        response = self.client.get(
            "/api/v1/roles?order_by=invalid", environ_overrides={'REMOTE_USER': "test"}
        )
        assert response.status_code == 400
        msg = "Ordering with 'invalid' is disallowed or the attribute does not exist on the model"
        assert response.json['detail'] == msg
    def test_should_raise_403_forbidden(self):
        response = self.client.get("/api/v1/roles", environ_overrides={'REMOTE_USER': "test_no_permissions"})
        assert response.status_code == 403
class TestGetRolesEndpointPaginationandFilter(TestRoleEndpoint):