@method_decorator(enterprise_login_required)<EOL><INDENT>@method_decorator(force_fresh_session)<EOL>def get(self, request, *args, **kwargs):<DEDENT>
enterprise_customer_uuid, course_run_id, course_key, program_uuid = RouterView.get_path_variables(**kwargs)<EOL>enterprise_customer = get_enterprise_customer_or_404(enterprise_customer_uuid)<EOL>if course_key:<EOL><INDENT>try:<EOL><INDENT>course_run_id = RouterView.get_course_run_id(request.user, enterprise_customer, course_key)<EOL><DEDENT>except Http404:<EOL><INDENT>context_data = get_global_context(request, enterprise_customer)<EOL>error_code = '<STR_LIT>'<EOL>log_message = (<EOL>'<STR_LIT>'<EOL>'<STR_LIT>'<EOL>'<STR_LIT>'<EOL>'<STR_LIT>'.format(<EOL>course_key=course_key,<EOL>course_run_id=course_run_id,<EOL>enterprise_customer_uuid=enterprise_customer_uuid,<EOL>error_code=error_code,<EOL>userid=request.user.id,<EOL>program_uuid=program_uuid,<EOL>)<EOL>)<EOL>return render_page_with_error_code_message(request, context_data, error_code, log_message)<EOL><DEDENT>kwargs['<STR_LIT>'] = course_run_id<EOL><DEDENT>with transaction.atomic():<EOL><INDENT>enterprise_customer_user, __ = EnterpriseCustomerUser.objects.get_or_create(<EOL>enterprise_customer=enterprise_customer,<EOL>user_id=request.user.id<EOL>)<EOL>enterprise_customer_user.update_session(request)<EOL><DEDENT>resource_id = course_run_id or program_uuid<EOL>if self.eligible_for_direct_audit_enrollment(request, enterprise_customer, resource_id, course_key):<EOL><INDENT>try:<EOL><INDENT>enterprise_customer_user.enroll(resource_id, '<STR_LIT>', cohort=request.GET.get('<STR_LIT>', None))<EOL>track_enrollment('<STR_LIT>', request.user.id, resource_id, request.get_full_path())<EOL><DEDENT>except (CourseEnrollmentDowngradeError, CourseEnrollmentPermissionError):<EOL><INDENT>pass<EOL><DEDENT>return redirect(LMS_COURSEWARE_URL.format(course_id=resource_id))<EOL><DEDENT>return self.redirect(request, *args, **kwargs)<EOL>
Run some custom GET logic for Enterprise workflows before routing the user through existing views.

In particular, before routing to existing views:
- If the requested resource is a course, find the current course run for that course,
  and make that course run the requested resource instead.
- Look to see whether a request is eligible for direct audit enrollment, and if so, directly enroll the user.