Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
f3318465
Commit
f3318465
authored
Dec 19, 2017
by
zubair-arbi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move enterprise specific code to separate method "_update_context_error_message_for_enterprise"
parent
e090d557
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
lms/djangoapps/student_account/views.py
+9
-0
No files found.
lms/djangoapps/student_account/views.py
View file @
f3318465
...
@@ -381,6 +381,15 @@ def _third_party_auth_context(request, redirect_to, tpa_hint=None):
...
@@ -381,6 +381,15 @@ def _third_party_auth_context(request, redirect_to, tpa_hint=None):
context
[
'errorMessage'
]
=
_
(
unicode
(
msg
))
# pylint: disable=translation-of-non-string
context
[
'errorMessage'
]
=
_
(
unicode
(
msg
))
# pylint: disable=translation-of-non-string
break
break
context
=
_update_context_for_enterprise_error_message
(
context
,
enterprise_customer
)
return
context
def
_update_context_for_enterprise_error_message
(
context
,
enterprise_customer
=
None
):
"""
Return updated context with modified `errorMessage` for enterprise.
"""
if
enterprise_customer
and
context
[
'errorMessage'
]:
if
enterprise_customer
and
context
[
'errorMessage'
]:
context
[
'errorMessage'
]
=
Text
(
_
(
context
[
'errorMessage'
]
=
Text
(
_
(
u'We are sorry, you are not authorized to access {platform_name} via this channel. '
u'We are sorry, you are not authorized to access {platform_name} via this channel. '
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment