Commit Graph

46 Commits

Author SHA1 Message Date
Calen Pennington
b353ed2ea2 Better support specifying of modulestore configuration in test cases
The existing pattern of using `override_settings(MODULESTORE=...)` prevented
us from having more than one layer of subclassing in modulestore tests.

In a structure like:

    @override_settings(MODULESTORE=store_a)
    class BaseTestCase(ModuleStoreTestCase):
        def setUp(self):
            # use store

    @override_settings(MODULESTORE=store_b)
    class ChildTestCase(BaseTestCase):
        def setUp(self):
            # use store

In this case, the store actions performed in `BaseTestCase` on behalf of
`ChildTestCase` would still use `store_a`, even though the `ChildTestCase`
had specified to use `store_b`. This is because the `override_settings`
decorator would be the innermost wrapper around the `BaseTestCase.setUp` method,
no matter what `ChildTestCase` does.

To remedy this, we move the call to `override_settings` into the
`ModuleStoreTestCase.setUp` method, and use a cleanup to remove the override.
Subclasses can just defined the `MODULESTORE` class attribute to specify which
modulestore to use _for the entire `setUp` chain_.

[PLAT-419]
2015-02-04 09:09:14 -05:00
Renzo Lucioni
a8bed5ce98 Make logistration generally available if feature flag is active
Makes logistration available at /login and /register as well as /accounts/login/ and /accounts/register/. In addition:

- Adds support for redirect URLs in third party auth for combined login/registration page
- Adds support for external auth on the combined login/registration page
- Removes old login and registration acceptance tests
- Adds deprecation warnings to old login and register views
- Moves third party auth util to student_account
- Adds exception for microsites (theming)
2015-01-30 13:28:30 -05:00
Brian Talbot
f128629f48 fixing styling and class syntax (to new FA-based classes) for missing UI elements 2015-01-09 12:01:26 -05:00
Chris
c5d2dd7536 Upgrading Font Awesome vendor files from 3.2.1 to 4.2.0
* updating vendor files
* updating class syntax (to new FA-based classes) for all UI elements
* correcting broken tests
2015-01-06 15:24:12 -05:00
Fred Smith
cc0789a104 Merge pull request #6355 from edx/release
Release
2014-12-23 08:32:58 -05:00
Will Daly
30549bd7ad Send the user to the login page if registering with a linked but inactive account 2014-12-22 13:23:29 -05:00
Ben Patterson
7be7b50ba9 Mock out the underlying segment-io call.
TE-532
2014-12-12 21:47:43 -05:00
Ben Patterson
6e1471edc4 Fix import statement. 2014-12-09 21:20:00 -05:00
Clinton Blackburn
947064f6ab Corrected Import Statement 2014-12-09 20:19:00 -05:00
stephensanchez
7ab0cb0730 3rd-party pipeline supports updating email optin
Fix all the 3rd party auth scenarios.

Update pipeline to preserve parameters.

Updating tests
2014-12-08 19:52:06 +00:00
Will Daly
8580620b52 Revert "If feature flag is enabled, replace the old login/registration pages with the new combined login/registration page."
This reverts commit f40447b3c8.

Conflicts:
	lms/urls.py

Revert "Add support for external auth on the combined login/registration page"

This reverts commit 988753395f.

Conflicts:
	lms/templates/courseware/mktg_course_about.html
	lms/urls.py
2014-12-05 10:41:42 -05:00
Will Daly
988753395f Add support for external auth on the combined login/registration page
Add support for redirect URLs in third party auth for combined login/registration page

Remove old login/registration acceptance tests

Add deprecation warnings to old login and register views

Move third party auth util to student_account

Add exception for microsites
2014-12-04 09:34:51 -05:00
Will Daly
f40447b3c8 If feature flag is enabled, replace the old login/registration pages with the new combined login/registration page. 2014-12-03 08:00:33 -05:00
Sarina Canelake
c54a71feb5 s/pylint:disable/pylint: disable/ (formatting fix) 2014-12-01 11:22:11 -05:00
Sarina Canelake
e15d4aea71 s/pylint: disable=F0401/pylint: disable=import-error/ 2014-12-01 11:22:10 -05:00
Sarina Canelake
1e0f3ddb7d s/pylint: disable=E1111,E1124/pylint: disable=assignment-from-no-return,redundant-keyword-arg/ 2014-12-01 11:22:09 -05:00
stv
b2ff02f0e1 Fix PEP8: E302 expected 2 blank lines, found 1 2014-11-26 15:10:04 -05:00
Renzo Lucioni
8d02efb021 Clean up pep8 and pylint violations
Also fixes failing Python unit tests
2014-11-12 12:55:56 -05:00
Will Daly
d50137bb64 Redirect to a valid URL when cancelling third party auth 2014-11-12 09:33:06 -05:00
Will Daly
5085b71677 Merge remote-tracking branch 'origin/master' into will/combine-reg-login-form
Conflicts:
	common/djangoapps/third_party_auth/pipeline.py
	lms/djangoapps/verify_student/tests/test_views.py
2014-11-10 15:05:37 -05:00
Greg Price
d2183c58c8 Add endpoint to log in with OAuth access token 2014-11-05 14:09:41 -05:00
Will Daly
48bc4776be Merge branch 'will/third-party-auth-fixes' into will/combine-reg-login-form
Conflicts:
	common/djangoapps/third_party_auth/__init__.py
	common/djangoapps/third_party_auth/pipeline.py
2014-10-28 15:16:27 -04:00
Will Daly
f9b5a9173f Redirect users to the track selection page or ?next page when using third party auth
Set marketing site logged in cookie from third party auth.
2014-10-28 10:28:30 -04:00
Will Daly
0cac6ea21b Fix pylint violations 2014-10-27 11:04:22 -04:00
Renzo Lucioni
05cb2a071b Prohibit automatic enrollment in prof ed courses when user authenticates via third-party auth 2014-10-24 15:59:42 -04:00
Will Daly
cc07afb967 Use a 403 status to indicate that the user does not have a linked
account for third party auth.
2014-10-24 08:57:54 -04:00
Will Daly
9e9dec1de1 Integrate third party auth into the combined login/registration page.
Change third party auth login failure code to a 401, to detect authentication
success with no linked account.

If already authenticated, redirect immediately to the dashboard.

Use "Location" header correctly for 302 redirects from student views.

Add utility functions for simulating a running third-party auth pipeline.

Add a utility function for checking whether third party auth is enabled.

Respect default values sent by the server
2014-10-22 17:10:49 -04:00
Will Daly
d558a36127 Fix unit test failures due to duplicate url names
Reset the correct URLs module to fix test failures.

Fix third party auth to reconfigure the registry on test cleanup.
2014-10-20 09:10:11 -04:00
Julia Hansbrough
c5ae921dea Merge pull request #5328 from edx/flowerhack/auto-login
Automatically log in users who access third party login after trying to register for a course
2014-09-25 10:40:33 -04:00
Will Daly
7f8c6bb058 Add Django apps for student account and profile.
Add Python APIs for account/profile information to user_api
Updating profile page to have social linking

Authors: Renzo Lucioni, Alasdair Swan, Stephen Sanchez, Will Daly
2014-09-25 08:36:22 -04:00
Julia Hansbrough
6b061ad23b Response to CR 2014-09-24 21:20:49 +00:00
Julia Hansbrough
3fbbe57cef Add auto-registration to third party login flow 2014-09-24 17:24:42 +00:00
Julia Hansbrough
5b3c69bc87 Tests fixed 2014-09-24 17:24:42 +00:00
Julia Hansbrough
059d0dfff3 Login analytics 2014-09-11 13:53:29 +00:00
Renzo Lucioni
93a263b92f Correct 3rd party auth login page message and styling 2014-09-03 09:50:45 -04:00
Julia Hansbrough
fd925e8970 Add server-side analytics logging for login
Also, removed the client-side analytics for logging in.
Ensures that analytics are collected for third-party-auth logins.
Fixed failing tests related to third-party-auth.
2014-08-29 19:49:42 +00:00
David Ormsbee
9a1687ab29 Facebook auth support. 2014-08-26 15:38:54 +00:00
Stephen Sanchez
9ee15bf007 Updating the footer for edx.org and open edx.
Move the open edx logo inside the div

Adding a bunch of placeholder views.

indenting.

Making some styles work against LMS sass.

Adding back the old edx footer and associated icons, with a feature flag.
2014-08-25 15:33:43 +00:00
Waheed Ahmed
05b87fd99b Implemented process_response method to clear requestcontext global variable in mako middleware.
LMS-6622
2014-08-06 19:58:20 +05:00
David Baumgold
ca7d895350 Revert "Make LinkedIn auth provider request email by default." 2014-07-01 10:05:01 -04:00
Matjaz Gregoric
5aabd3a48e Add scope/field selector settings for LinkedIn provider.
This change adds three new configuration variables to third_party_auth's LinkedIn provider:

* SOCIAL_AUTH_LINKEDIN_OAUTH2_SCOPE,
* SOCIAL_AUTH_LINKEDIN_OAUTH2_FIELD_SELECTORS,
* SOCIAL_AUTH_LINKEDIN_OAUTH2_EXTRA_DATA

Being able to configure these additional settings is useful if you want
the LinkedIn provider to pre-populate the email field when a new user
registers via the linkedin provider.

The Google provider prepoulates the email field by default, but if you
want LinkedIn to do the same, these two settings should be set to:

SOCIAL_AUTH_LINKEDIN_OAUTH2_SCOPE = ['r_basicprofile', 'r_emailaddress']
SOCIAL_AUTH_LINKEDIN_OAUTH2_FIELD_SELECTORS = ['email-address']

For more info see:
http://psa.matiasaguirre.net/docs/backends/linkedin.html
2014-06-16 10:27:38 +02:00
John Cox
5333bd7d14 Fix bug that prevented account association during registration 2014-04-29 17:42:08 -07:00
John Cox
1192b5f7c9 Make dispatch logic clearer 2014-04-25 12:11:20 -07:00
John Cox
c80b596890 Fix two error message corner cases 2014-04-25 12:11:20 -07:00
John Cox
ce0b640712 Add third-party auth implementation and tests 2014-04-25 12:11:20 -07:00
John Cox
8ecfa8679a Add common/djangoapps/third_party_auth; update pylintrc to allow test_* names.
third_party_auth contains a working settings mechanism, the start of the provider interface + 3 implementations (Google, Mozilla Persona, LinkedIn), and a stub for the auth pipeline. Modified existing lms settings files to use but deactivate the module.
2014-03-06 17:20:58 -08:00