Commit e369939b by zubair-arbi

change redirect url from '/accounts/login' to '/login'

ECOM-1734
parent 9d5b5658
...@@ -170,7 +170,7 @@ class SSLClientTest(ModuleStoreTestCase): ...@@ -170,7 +170,7 @@ class SSLClientTest(ModuleStoreTestCase):
""" """
response = self.client.get(reverse('dashboard'), follows=True) response = self.client.get(reverse('dashboard'), follows=True)
self.assertEqual(response.status_code, 302) self.assertEqual(response.status_code, 302)
self.assertIn(reverse('accounts_login'), response['location']) self.assertIn(reverse('signin_user'), response['location'])
response = self.client.get( response = self.client.get(
reverse('dashboard'), follow=True, reverse('dashboard'), follow=True,
......
...@@ -429,7 +429,7 @@ class ExternalAuthShibTest(ModuleStoreTestCase): ...@@ -429,7 +429,7 @@ class ExternalAuthShibTest(ModuleStoreTestCase):
""" """
response = self.client.get(reverse('dashboard')) response = self.client.get(reverse('dashboard'))
self.assertEqual(response.status_code, 302) 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") @unittest.skipUnless(settings.FEATURES.get('AUTH_USE_SHIB'), "AUTH_USE_SHIB not set")
def test_externalauth_login_required_course_context(self): def test_externalauth_login_required_course_context(self):
...@@ -440,7 +440,7 @@ class ExternalAuthShibTest(ModuleStoreTestCase): ...@@ -440,7 +440,7 @@ class ExternalAuthShibTest(ModuleStoreTestCase):
TARGET_URL = reverse('courseware', args=[self.course.id.to_deprecated_string()]) # pylint: disable=invalid-name TARGET_URL = reverse('courseware', args=[self.course.id.to_deprecated_string()]) # pylint: disable=invalid-name
noshib_response = self.client.get(TARGET_URL, follow=True) noshib_response = self.client.get(TARGET_URL, follow=True)
self.assertEqual(noshib_response.redirect_chain[-1], 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}" self.assertContains(noshib_response, ("Sign in or Register | {platform_name}"
.format(platform_name=settings.PLATFORM_NAME))) .format(platform_name=settings.PLATFORM_NAME)))
self.assertEqual(noshib_response.status_code, 200) self.assertEqual(noshib_response.status_code, 200)
......
...@@ -90,7 +90,7 @@ class LoginFormTest(ThirdPartyAuthTestMixin, UrlResetMixin, ModuleStoreTestCase) ...@@ -90,7 +90,7 @@ class LoginFormTest(ThirdPartyAuthTestMixin, UrlResetMixin, ModuleStoreTestCase)
self.assertRedirects( self.assertRedirects(
response, response,
u"{url}?next={redirect_url}".format( u"{url}?next={redirect_url}".format(
url=reverse("accounts_login"), url=reverse("signin_user"),
redirect_url=self.courseware_url redirect_url=self.courseware_url
) )
) )
......
...@@ -46,7 +46,7 @@ class WikiAccessMiddleware(object): ...@@ -46,7 +46,7 @@ class WikiAccessMiddleware(object):
# wiki pages are login required # wiki pages are login required
if not request.user.is_authenticated(): 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) course_id = course_id_from_url(request.path)
wiki_path = request.path.partition('/wiki/')[2] wiki_path = request.path.partition('/wiki/')[2]
......
...@@ -165,4 +165,4 @@ class WikiRedirectTestCase(LoginEnrollmentTestCase, ModuleStoreTestCase): ...@@ -165,4 +165,4 @@ class WikiRedirectTestCase(LoginEnrollmentTestCase, ModuleStoreTestCase):
# and end up at the login page # and end up at the login page
resp = self.client.get(course_wiki_page, follow=True) resp = self.client.get(course_wiki_page, follow=True)
target_url, __ = resp.redirect_chain[-1] target_url, __ = resp.redirect_chain[-1]
self.assertTrue(reverse('accounts_login') in target_url) self.assertTrue(reverse('signin_user') in target_url)
...@@ -543,7 +543,7 @@ class TestPayAndVerifyView(UrlResetMixin, ModuleStoreTestCase): ...@@ -543,7 +543,7 @@ class TestPayAndVerifyView(UrlResetMixin, ModuleStoreTestCase):
original_url = reverse(url_name, kwargs={'course_id': unicode(course.id)}) original_url = reverse(url_name, kwargs={'course_id': unicode(course.id)})
login_url = u"{login_url}?next={original_url}".format( login_url = u"{login_url}?next={original_url}".format(
login_url=reverse('accounts_login'), login_url=reverse('signin_user'),
original_url=original_url original_url=original_url
) )
self.assertRedirects(response, login_url) self.assertRedirects(response, login_url)
......
...@@ -546,8 +546,8 @@ DEV_CONTENT = True ...@@ -546,8 +546,8 @@ DEV_CONTENT = True
EDX_ROOT_URL = '' EDX_ROOT_URL = ''
LOGIN_REDIRECT_URL = EDX_ROOT_URL + '/accounts/login' LOGIN_REDIRECT_URL = EDX_ROOT_URL + '/login'
LOGIN_URL = EDX_ROOT_URL + '/accounts/login' LOGIN_URL = EDX_ROOT_URL + '/login'
COURSE_NAME = "6.002_Spring_2012" COURSE_NAME = "6.002_Spring_2012"
COURSE_NUMBER = "6.002x" COURSE_NUMBER = "6.002x"
......
...@@ -9,7 +9,7 @@ $(document).ajaxError(function (event, jXHR) { ...@@ -9,7 +9,7 @@ $(document).ajaxError(function (event, jXHR) {
if (window.confirm(message)) { if (window.confirm(message)) {
var currentLocation = window.location.href; var currentLocation = window.location.href;
window.location.href = '/accounts/login?next=' + currentLocation; window.location.href = '/login?next=' + currentLocation;
}; };
} }
}); });
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment