Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
code.vt.edu will be down for maintenance from 0530-0630 EDT Wednesday, March 26th
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
aa3119e4
Unverified
Commit
aa3119e4
authored
4 years ago
by
Zainab Amir
Committed by
GitHub
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add new relic metrics (#26003)
parent
d9174fc0
Branches
Branches containing commit
Tags
release-2021-01-05-15.23
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
openedx/core/djangoapps/user_authn/views/login.py
+8
-1
8 additions, 1 deletion
openedx/core/djangoapps/user_authn/views/login.py
openedx/core/djangoapps/user_authn/views/register.py
+3
-0
3 additions, 0 deletions
openedx/core/djangoapps/user_authn/views/register.py
with
11 additions
and
1 deletion
openedx/core/djangoapps/user_authn/views/login.py
+
8
−
1
View file @
aa3119e4
...
...
@@ -467,6 +467,8 @@ def login_user(request):
except
AuthFailedError
as
e
:
set_custom_attribute
(
'
login_user_tpa_success
'
,
False
)
set_custom_attribute
(
'
login_user_tpa_failure_msg
'
,
e
.
value
)
if
e
.
error_code
:
set_custom_attribute
(
'
login_error_code
'
,
e
.
error_code
)
# user successfully authenticated with a third party provider, but has no linked Open edX account
response_content
=
e
.
get_response
()
...
...
@@ -512,7 +514,12 @@ def login_user(request):
except
AuthFailedError
as
error
:
response_content
=
error
.
get_response
()
log
.
exception
(
response_content
)
if
response_content
.
get
(
'
error_code
'
)
==
'
inactive-user
'
:
error_code
=
response_content
.
get
(
'
error_code
'
)
if
error_code
:
set_custom_attribute
(
'
login_error_code
'
,
error_code
)
if
error_code
==
'
inactive-user
'
:
response_content
[
'
email
'
]
=
user
.
email
response
=
JsonResponse
(
response_content
,
status
=
400
)
...
...
This diff is collapsed.
Click to expand it.
openedx/core/djangoapps/user_authn/views/register.py
+
3
−
0
View file @
aa3119e4
...
...
@@ -21,6 +21,7 @@ from django.utils.translation import get_language
from
django.utils.translation
import
ugettext
as
_
from
django.views.decorators.csrf
import
csrf_exempt
,
ensure_csrf_cookie
from
django.views.decorators.debug
import
sensitive_post_parameters
from
edx_django_utils.monitoring
import
set_custom_attribute
from
edx_toggles.toggles
import
LegacyWaffleFlag
,
LegacyWaffleFlagNamespace
from
pytz
import
UTC
from
ratelimit.decorators
import
ratelimit
...
...
@@ -182,6 +183,8 @@ def create_account_with_params(request, params):
]}
)
if
is_third_party_auth_enabled
:
set_custom_attribute
(
'
register_user_tpa
'
,
pipeline
.
running
(
request
))
extended_profile_fields
=
configuration_helpers
.
get_value
(
'
extended_profile_fields
'
,
[])
# Can't have terms of service for certain SHIB users, like at Stanford
registration_fields
=
getattr
(
settings
,
'
REGISTRATION_EXTRA_FIELDS
'
,
{})
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment