def METHOD_NAME(
    user: GitHubUser, project: Project, role: ScratchOrgType
) -> bool:
    """Determine if the given User has appropriate GitHub permissions to
    accept the specified role on this project."""
    return (
        project.has_push_permission(user)
        if role is ScratchOrgType.DEV
        else project.has_pull_permission(user)
    )