def METHOD_NAME(user, show_restricted=False, filter_program=None):
    """Return list of all projects a user can view
    If a project is unpublished, and the user is not allowed to edit that
    project, the project is not displayed in the list.
    Any projects where the user's access has been restricted (using fine-access
    control) are also not shown.
    """
    # Get project list
    if user.is_superuser or user.is_admin:
        # Superuser and general admins are allowed to see all projects
        projects = Project.objects.all()
    else:
        # For each employment, check if the user is allowed to edit projects (e.g. not a 'User' or
        # 'User Manager'). If not, do not show the unpublished projects of that organisation.
        projects = Project.objects.none()
        # Not allowed to edit roles
        uneditable_projects = user.my_projects(
            group_names=NO_EDIT_ROLES, show_restricted=show_restricted).published()
        projects = projects | uneditable_projects
        # Allowed to edit roles
        editable_projects = user.my_projects(
            group_names=EDIT_ROLES, show_restricted=show_restricted)
        projects = projects | editable_projects
        projects = projects.distinct()
    if filter_program:
        programs = ProjectHierarchy.objects.select_related('root_project')
        if filter_program != -1:
            programs = programs.filter(root_project=filter_program)
        programs_projects = set()
        for program in programs:
            programs_projects.update(program.project_ids)
        projects = projects.exclude(pk__in=programs_projects) if filter_program == -1 \
            else projects.filter(pk__in=programs_projects)
    return projects