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
e369939b
Commit
e369939b
authored
Jul 02, 2015
by
zubair-arbi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change redirect url from '/accounts/login' to '/login'
ECOM-1734
parent
9d5b5658
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
10 additions
and
10 deletions
+10
-10
common/djangoapps/external_auth/tests/test_ssl.py
+1
-1
common/djangoapps/student/tests/test_login.py
+2
-2
common/djangoapps/student/tests/test_login_registration_forms.py
+1
-1
lms/djangoapps/course_wiki/middleware.py
+1
-1
lms/djangoapps/course_wiki/tests/tests.py
+1
-1
lms/djangoapps/verify_student/tests/test_views.py
+1
-1
lms/envs/common.py
+2
-2
lms/static/js/ajax-error.js
+1
-1
No files found.
common/djangoapps/external_auth/tests/test_ssl.py
View file @
e369939b
...
...
@@ -170,7 +170,7 @@ class SSLClientTest(ModuleStoreTestCase):
"""
response
=
self
.
client
.
get
(
reverse
(
'dashboard'
),
follows
=
True
)
self
.
assertEqual
(
response
.
status_code
,
302
)
self
.
assertIn
(
reverse
(
'
accounts_login
'
),
response
[
'location'
])
self
.
assertIn
(
reverse
(
'
signin_user
'
),
response
[
'location'
])
response
=
self
.
client
.
get
(
reverse
(
'dashboard'
),
follow
=
True
,
...
...
common/djangoapps/student/tests/test_login.py
View file @
e369939b
...
...
@@ -429,7 +429,7 @@ class ExternalAuthShibTest(ModuleStoreTestCase):
"""
response
=
self
.
client
.
get
(
reverse
(
'dashboard'
))
self
.
assertEqual
(
response
.
status_code
,
302
)
self
.
assertEqual
(
response
[
'Location'
],
'http://testserver/
accounts/
login?next=/dashboard'
)
self
.
assertEqual
(
response
[
'Location'
],
'http://testserver/login?next=/dashboard'
)
@unittest.skipUnless
(
settings
.
FEATURES
.
get
(
'AUTH_USE_SHIB'
),
"AUTH_USE_SHIB not set"
)
def
test_externalauth_login_required_course_context
(
self
):
...
...
@@ -440,7 +440,7 @@ class ExternalAuthShibTest(ModuleStoreTestCase):
TARGET_URL
=
reverse
(
'courseware'
,
args
=
[
self
.
course
.
id
.
to_deprecated_string
()])
# pylint: disable=invalid-name
noshib_response
=
self
.
client
.
get
(
TARGET_URL
,
follow
=
True
)
self
.
assertEqual
(
noshib_response
.
redirect_chain
[
-
1
],
(
'http://testserver/
accounts/
login?next={url}'
.
format
(
url
=
TARGET_URL
),
302
))
(
'http://testserver/login?next={url}'
.
format
(
url
=
TARGET_URL
),
302
))
self
.
assertContains
(
noshib_response
,
(
"Sign in or Register | {platform_name}"
.
format
(
platform_name
=
settings
.
PLATFORM_NAME
)))
self
.
assertEqual
(
noshib_response
.
status_code
,
200
)
...
...
common/djangoapps/student/tests/test_login_registration_forms.py
View file @
e369939b
...
...
@@ -90,7 +90,7 @@ class LoginFormTest(ThirdPartyAuthTestMixin, UrlResetMixin, ModuleStoreTestCase)
self
.
assertRedirects
(
response
,
u"{url}?next={redirect_url}"
.
format
(
url
=
reverse
(
"
accounts_login
"
),
url
=
reverse
(
"
signin_user
"
),
redirect_url
=
self
.
courseware_url
)
)
...
...
lms/djangoapps/course_wiki/middleware.py
View file @
e369939b
...
...
@@ -46,7 +46,7 @@ class WikiAccessMiddleware(object):
# wiki pages are login required
if
not
request
.
user
.
is_authenticated
():
return
redirect
(
reverse
(
'
accounts_login
'
),
next
=
request
.
path
)
return
redirect
(
reverse
(
'
signin_user
'
),
next
=
request
.
path
)
course_id
=
course_id_from_url
(
request
.
path
)
wiki_path
=
request
.
path
.
partition
(
'/wiki/'
)[
2
]
...
...
lms/djangoapps/course_wiki/tests/tests.py
View file @
e369939b
...
...
@@ -165,4 +165,4 @@ class WikiRedirectTestCase(LoginEnrollmentTestCase, ModuleStoreTestCase):
# and end up at the login page
resp
=
self
.
client
.
get
(
course_wiki_page
,
follow
=
True
)
target_url
,
__
=
resp
.
redirect_chain
[
-
1
]
self
.
assertTrue
(
reverse
(
'
accounts_login
'
)
in
target_url
)
self
.
assertTrue
(
reverse
(
'
signin_user
'
)
in
target_url
)
lms/djangoapps/verify_student/tests/test_views.py
View file @
e369939b
...
...
@@ -543,7 +543,7 @@ class TestPayAndVerifyView(UrlResetMixin, ModuleStoreTestCase):
original_url
=
reverse
(
url_name
,
kwargs
=
{
'course_id'
:
unicode
(
course
.
id
)})
login_url
=
u"{login_url}?next={original_url}"
.
format
(
login_url
=
reverse
(
'
accounts_login
'
),
login_url
=
reverse
(
'
signin_user
'
),
original_url
=
original_url
)
self
.
assertRedirects
(
response
,
login_url
)
...
...
lms/envs/common.py
View file @
e369939b
...
...
@@ -546,8 +546,8 @@ DEV_CONTENT = True
EDX_ROOT_URL
=
''
LOGIN_REDIRECT_URL
=
EDX_ROOT_URL
+
'/
accounts/
login'
LOGIN_URL
=
EDX_ROOT_URL
+
'/
accounts/
login'
LOGIN_REDIRECT_URL
=
EDX_ROOT_URL
+
'/login'
LOGIN_URL
=
EDX_ROOT_URL
+
'/login'
COURSE_NAME
=
"6.002_Spring_2012"
COURSE_NUMBER
=
"6.002x"
...
...
lms/static/js/ajax-error.js
View file @
e369939b
...
...
@@ -9,7 +9,7 @@ $(document).ajaxError(function (event, jXHR) {
if
(
window
.
confirm
(
message
))
{
var
currentLocation
=
window
.
location
.
href
;
window
.
location
.
href
=
'/
accounts/
login?next='
+
currentLocation
;
window
.
location
.
href
=
'/login?next='
+
currentLocation
;
};
}
});
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