def get_all_affiliations(request):
    """
    return a dictionary of affiliation indicators.

    The first class affiliations:
    ["all_employee"]: employee or clinician (include student employee)
    ["employee"]: True if is current employee (not student employee, clinician)
    ["clinician"]: True if in uw affiliation clinical groups
    ["faculty"]: True if the user is currently faculty.
    ["instructor"]: True if is instructor in the past 6 years
    ["staff_employee"]: True if the user is currently staff.
    ["student"]: True if the user is currently an UW student.
    ["stud_employee"]: True if the user is currently a student employee.
    ["grad"]: True if the user is currently an UW graduate student.
    ["undergrad"]: True if the user is currently an UW undergraduate student.
    ["applicant"]: True if the user is currently a UW applicant
    ["pce"]: True if the user is an UW PCE student.
    ["grad_c2"]: True if the user takes UW PCE grad courses
    ["undergrad_c2"]: True if the user takes UW PCE undergrad courses

    ["seattle"]: True if the user is an UW Seattle student
    ["bothell"]: True if the user is an UW Bothell student
    ["tacoma"]: True if the user is an UW Tacoma student
    ["official_seattle"]: True if the user is Seattle employee
    ["official_bothell"]: True if the user is Bothell employee
    ["official_tacoma"]: True if the user is Tacoma employee
    ["official_pce"]: waiting on sws to add a field in Enrollment.
    ["class_level"]: class level in current term enrollment.
    ["latest_class_level"]: the class level in the latest enrollment.
    ["F1"]: F1 international student
    ["J1"]: J1 international student
    ["intl_stud"]: F1 or J1 international student
    ["hxt_viewer"]: Husky Experience Toolkit viewer
    ["no_1st_class_affi"]: not applicant, current employee,
                           clinician, student, instructor
    The following are secondary affiliations (without 1st_class_aff):
    ["alumni"]: True if the user is currently an UW alumni and NOT
                current student, employee, applicant
    ["alum_asso"]: alumni association member
    ["retiree"]: True if the user is a retired staff  and NOT
                current applicant, student, employee
    ["past_employee"]: True if the user is a former employee and NOT
                       current student, applicant
    ["past_stud"]: True if the user is a former student and NOT
                   current employee, applicant
    """
    if hasattr(request, 'myuw_user_affiliations'):
        return request.myuw_user_affiliations

    not_major_affi = (not is_applicant(request) and
                      not is_employee(request) and
                      not is_clinician(request) and
                      not is_instructor(request) and
                      not is_student(request))
    (is_sea_stud, is_undergrad, is_hxt_viewer) = get_is_hxt_viewer(request)
    data = {"class_level": None,
            "latest_class_level": get_latest_class_level(request),
            "grad": is_grad_student(request),
            "undergrad": is_undergrad,
            "applicant": is_applicant(request),
            "student": is_student(request),
            "pce": is_pce_student(request),
            "grad_c2": is_grad_c2(request),
            "undergrad_c2": is_undergrad_c2(request),
            "F1": False,
            "J1": False,
            "intl_stud": False,
            "2fa_permitted": is_2fa_permitted(request),
            "all_employee": is_employee(request) or is_clinician(request),
            "clinician": is_clinician(request),
            "employee": (is_employee(request) and
                         not is_student_employee(request)),
            "faculty": is_faculty(request),
            "instructor": is_instructor(request),
            "staff_employee": is_staff_employee(request),
            "stud_employee": is_student_employee(request),
            "seattle": is_sea_stud,
            "bothell": is_bothell_student(request),
            "tacoma": is_tacoma_student(request),
            "official_seattle": False,
            "official_bothell": False,
            "official_tacoma": False,
            "hxt_viewer": is_hxt_viewer,
            "alum_asso": is_alum_asso(request),
            "alumni": is_alumni(request) and not_major_affi,
            "retiree": is_retiree(request) and not_major_affi,
            "past_employee": is_prior_employee(request) and not_major_affi,
            "past_stud": is_prior_student(request) and not_major_affi,
            "no_1st_class_affi": not_major_affi,
            }

    campuses = []

    if data["student"]:
        data["class_level"] = get_cur_class_level(request)
        try:
            sws_person = get_profile_of_current_user(request)
            data["F1"] = sws_person.is_F1()
            data["J1"] = sws_person.is_J1()
            data["intl_stud"] = data["F1"] or data["J1"]
        except Exception:
            log_err(logger, "get_profile_of_current_user", traceback, request)

        # enhance student campus with current and future enrollments
        campuses = get_main_campus(request)
        if len(campuses) > 0:
            data["enrolled_stud"] = True
            data['seattle'] = data['seattle'] or ('Seattle' in campuses)
            data['bothell'] = data['bothell'] or ('Bothell' in campuses)
            data['tacoma'] = data['tacoma'] or ('Tacoma' in campuses)

        if data['seattle']:
            data["hxt_viewer"] = (data["hxt_viewer"] or
                                  data['seattle'] and data["undergrad"])

    if is_employee(request):
        # determine employee primary campus based on their mailstop
        try:
            employee_campus = get_employee_campus(request)
            data['official_seattle'] = ('Seattle' == employee_campus)
            data['official_bothell'] = ('Bothell' == employee_campus)
            data['official_tacoma'] = ('Tacoma' == employee_campus)
        except IndeterminateCampusException:
            pass

    request.myuw_user_affiliations = data
    return data