Skip to content

Commit

Permalink
chore: add logging to fa form (#34224)
Browse files Browse the repository at this point in the history
* chore: add logging to fa form

* chore: formatting
  • Loading branch information
christopappas committed Feb 12, 2024
1 parent 2e15d69 commit 4a2e7c7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lms/djangoapps/courseware/views/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -2013,6 +2013,10 @@ def financial_assistance_request(request):
username = data['username']
if request.user.username != username:
return HttpResponseForbidden()
# Require email verification
if request.user.is_active is not True:
logging.warning('FA_v1: User %s tried to submit app without activating their account.', username)
return HttpResponseForbidden('Please confirm your email before applying for financial assistance.')

course_id = data['course']
course = modulestore().get_course(CourseKey.from_string(course_id))
Expand Down Expand Up @@ -2087,6 +2091,7 @@ def financial_assistance_request_v2(request):
return HttpResponseForbidden()
# Require email verification
if request.user.is_active is not True:
logging.warning('FA_v2: User %s tried to submit app without activating their account.', username)
return HttpResponseForbidden('Please confirm your email before applying for financial assistance.')

course_id = data['course']
Expand Down

0 comments on commit 4a2e7c7

Please sign in to comment.