Commit Graph

4129 Commits

Author SHA1 Message Date
Usama Sadiq
3fb00a40e0 Merge pull request #22552 from edx/usama/prod-793-custom-backpopulate-credentials-arguments
Code fix & removed Pylint Warning Supression
2019-12-17 15:44:41 +05:00
usama sadiq
dc666127f1 Code fix & removed Pylint Warning 2019-12-17 15:01:30 +05:00
Robert Raposa
c5f44bf20e update READMEs to clarify responsibilities
Add some clarifications for student, user_api, and user_authn given
the recent clean-up of moving code to the appropriate apps.

ARCH-1248
2019-12-16 13:51:43 -05:00
Robert Raposa
b2be6b3ba2 Merge pull request #22513 from edx/robrap/ARCH-1253-login-user-post-only-take-3
ARCH-1253: require POST for login_user
2019-12-15 15:59:00 -05:00
Robert Raposa
3505492fff require POST for login_user
ARCH-1253
2019-12-15 11:20:06 -05:00
Robert Raposa
f9613e8436 Merge pull request #22523 from edx/robrap/ARCH-1253-remove-DISABLE_DEPRECATED_LOGIN_POST
ARCH-1253: remove unused /login_post endpoint
2019-12-13 15:20:34 -05:00
usama sadiq
044a4899c5 Added custom arguments to the back-populate job
BackPopulate Program Credentials job performs data for all the programs
and for all the available learners which takes a lot of time.
Adding in custom arguments will help run this job for specific learners
and specific programs.
2019-12-13 19:34:53 +05:00
Robert Raposa
a9825889bf remove /login_post endpoint
- retires toggle DISABLE_DEPRECATED_LOGIN_POST
- permanently removes /login_post

Now that studio signin has been retired, we are able to remove the
unused /login_post endpoint.

ARCH-1253
2019-12-12 17:09:18 -05:00
Robert Raposa
d79e7df32b use login_ajax for logistration
- use login_ajax (in place of login_session with shim) for
logistration's call to login POST
- add toggle for using login_ajax from logistration
  - FEATURES['ENABLE_LOGIN_POST_WITHOUT_SHIM']
- add custom metrics for redirect_url
- update test for third-party auth error_code

NOTE: The error_code `third-party-auth-with-no-linked-account`
was introduced in JSON in this earlier PR:
https://github.com/edx/edx-platform/pull/22452/files

ARCH-1253
2019-12-12 10:39:49 -05:00
hunytalk
28d5458a1c Custom management command for data migration in Schedule 2019-12-12 00:02:59 +05:00
Nimisha Asthagiri
022a0117ae Merge pull request #22468 from edx/arch/account-activation-cleanup
Account Activation cleanup
2019-12-10 21:26:03 -05:00
Nimisha Asthagiri
f539a51901 user_authn: Move password-related tests to test_password.py 2019-12-10 20:23:52 -05:00
Nimisha Asthagiri
5e3df7aed4 user_api: Remove unneeded test-only activate_account 2019-12-10 20:23:52 -05:00
David Ormsbee
f508ba3d01 Merge pull request #19941 from open-craft/jill/opt-out-weekly-highlight-messages
Add api support to let users opt out of email updates
2019-12-09 16:57:09 -05:00
Robert Raposa
06a0d3ff71 Merge pull request #22453 from edx/robrap/ARCH-1253-remove-UPDATE_LOGIN_USER_ERROR_STATUS_CODE
remove UPDATE_LOGIN_USER_ERROR_STATUS_CODE toggle
2019-12-09 14:16:57 -05:00
Feanil Patel
01b6b19f2e Merge pull request #22454 from edx/feanil/handle_pickling_failure
Feanil/handle pickling failure
2019-12-09 11:44:14 -05:00
Feanil Patel
f485ff450d Deal with pylint. 2019-12-09 11:03:22 -05:00
Taranjeet Singh
00653433a5 Adds optional "unsubscribe" link and api support to let users opt out of email updates.
Scheduled emails show "unsubscribe" link if waffle switch
`schedules.course_update_show_unsubscribe` is enabled, and
settings.ACE_ENABLED_POLICIES respects `bulk_email_optout`.

API endpoint allows GET/POST requests, which:

* GET asks for confirmation of opt-out
* POST accepts "unsubscribe" or "cancel", where "unsubscribe" creates the
  Optout entry, and "cancel" does nothing.

Fixes flaky tests:

* The resolvers handle users in "bins", which are groups that depend on the user ID.
* The test user ID varies depending on the test order.
* This change ensures that the bin requested matches the user for the test.
2019-12-09 22:49:57 +10:30
Robert Raposa
9e4706e7bb remove UPDATE_LOGIN_USER_ERROR_STATUS_CODE toggle
The toggle UPDATE_LOGIN_USER_ERROR_STATUS_CODE was added to roll out a
breaking change for `login_user` auth errors to return a 400 rather than
a 200.

This toggle was enabled in Production on 12/5/2019 with seemingly no
adverse affects.

ARCH-1253
2019-12-06 17:20:17 -05:00
Robert Raposa
adf6327196 Merge pull request #22465 from edx/robrap/ARCH-1253-fix-flaky-test
fix flaky test_login unit test
2019-12-06 17:03:45 -05:00
Robert Raposa
6fc75c834b fix flaky test_login unit test
ARCH-1253
2019-12-06 16:19:52 -05:00
Feanil Patel
bf482f4989 Respond to code review. 2019-12-06 15:02:22 -05:00
Diana Huang
461b11650e Move account_settings into user_api. 2019-12-06 10:27:26 -05:00
David Ormsbee
be7df8ba9f Merge pull request #22451 from edx/ormsbee/course_staff_search_preview
Add ENABLE_COURSEWARE_SEARCH_FOR_COURSE_STAFF flag
2019-12-06 09:55:35 -05:00
Feanil Patel
48e9724808 Handle other places where we might be unpickling things.
We use pickling in conjunction with caches in these cases so we should
be able to fallback to the uncached behavior if the pickled data is
corrupt in some way.

eg. it's a python 2 pickle we don't know how to read.
2019-12-05 17:06:12 -05:00
Robert Raposa
ebcff3fb4b return json for third party auth failure
Returning JSON from `login_user` for third party auth failures makes
the response more consistent with all other `login_user` responses.

The only calls to `login_user` with this failure are processed by
`shim_student_view` which will in-turn remove this JSON. This improves
the `login_user` response in advance of switching the logistration page
to use `login_user` without `shim_student_view`.

ARCH-1253
2019-12-05 16:29:35 -05:00
David Ormsbee
aaf4c46645 Add ENABLE_COURSEWARE_SEARCH_FOR_COURSE_STAFF flag
Add an LMS feature flag to enable courseware search for course staff
only. TNL-6931
2019-12-05 15:14:26 -05:00
Braden MacDonald
1ea3c032d3 Fixes for the blockstore API client / XBlock runtime under python 3 2019-12-05 09:24:24 -08:00
Robert Raposa
0d899a1392 Merge pull request #22357 from edx/robrap/ARCH-1253-login-cleanup-part-1
ARCH-1253: clean-up login part 1
2019-12-05 11:23:39 -05:00
Zia Fazal
b2de1b5214 Merge pull request #22448 from edx/revert-22413-revert-22345-ziafazal/ENT-1849-b
Revert "Revert "ENT-1849: Removed EnterpriseMiddleware""
2019-12-05 19:00:15 +05:00
DawoudSheraz
2470d9a0f5 fix logs condition 2019-12-05 11:08:38 +05:00
Robert Raposa
58fadab939 clean-up login part 1
`shim_student_view` is used for login, and is being simplified so it
can ulimately be completely deleted. In this commit, the shim
preprocessing was removed by deleting unused code, and moving code
that is still being used to login_user.

Note: `shim_student_view` was originally added in
https://github.com/edx/edx-platform/pull/5768/files

ARCH-1253
2019-12-04 17:01:23 -05:00
hunytalk
227ae8a51a Add reference to new field in schedule model 2019-12-04 19:05:55 +05:00
Robert Raposa
2202545aec remove studio signin and signup pages
This completes the work started in https://github.com/edx/edx-platform/pull/19453
to use the LMS login and registration for Studio, rather than Studio
providing its own implementation.

LMS login/registration are being used for the following reasons:
1. LMS logistration properly handles all SSO integrations.
2. A single logistration is simpler to maintain and understand.
3. Allows Studio to work more like all other IDAs that use LMS
logistration.

The original switch to use LMS logistration for Studio also added the
toggle `DISABLE_STUDIO_SSO_OVER_LMS` to provide the community some
additional time for switching. This commit removes this toggle, which
at this point means all deployments will use the LMS logistration.

This change requires sharing cookies across LMS and Studio. Should that
prove to be a problem for certain Open edX instances, there are
discussions of possible alternative solutions.
See https://github.com/edx/edx-platform/pull/19845#issuecomment-559154256

Detailed changes:
* Fix some Studio links that still went to old Studio signin and signup.
* Remove DISABLE_STUDIO_SSO_OVER_LMS feature toggle.
* Remove old studio signin and signup pages and templates.
* Fix url name "login", which had different meanings for Studio and LMS.
* Use the following settings: LOGIN_URL, FRONTEND_LOGIN_URL,
FRONTEND_LOGOUT_URL, and FRONTEND_REGISTER_URL.
* Redirect /signin and /signup to the LMS logistration.
* Add custom metric `uses_pattern_library`.
* Add custom metric `student_activate_account`.
* Add Django Settings to allow /signin, /signup, and /login_post to be
disabled once ready.

This work also relates to ARCH-218 and DEPR-6.

ARCH-1253
2019-12-04 02:36:36 -05:00
Diana Huang
54be35f913 Move AccountCreationForm to user_authn. 2019-12-02 17:20:23 -05:00
Zia Fazal
94166afa64 Revert "Revert "ENT-1849: Removed EnterpriseMiddleware"" 2019-12-02 11:28:59 +05:00
Zia Fazal
052035bcfd Revert "ENT-1849: Removed EnterpriseMiddleware" 2019-11-27 19:26:07 +05:00
DawoudSheraz
871f3bfb7e conditional logs to find the inconsistent block id in MITx course 2019-11-27 12:28:15 +05:00
Ned Batchelder
30d4c37a30 Merge pull request #22091 from mahyard/activation-email-to-ace
Activation email to ace
2019-11-26 13:09:20 -05:00
adeelehsan
b9fd7f24ce Merge pull request #22394 from edx/aehsan/prod-1004/added_uri_for_explore_new_programs
Uri added for explore new program
2019-11-26 18:36:26 +05:00
adeelehsan
c7172c1d69 Uri added for explore new program
PROD-1004
2019-11-26 17:28:45 +05:00
Robert Raposa
6086e37c28 Merge pull request #22379 from edx/robrap/ARCH-1253-login-post-clean-up
ARCH-1253: switch login_user errors to 400
2019-11-25 16:15:02 -05:00
Shadi Naif
f93023bafe Convert Account Activation Emails to edx-ACE 2019-11-25 23:56:09 +03:30
Diana Huang
f8c8bf36a6 Move password reset logic from student to user_authn. 2019-11-25 13:58:09 -05:00
Robert Raposa
5aa6181f85 switch login_user errors to 400
The APIs using login_user are currently not following the API
conventions for non-SSO related authentication errors, by returning a
200 status code for errors.

In addition to switching the status code from 200 => 400 for
authentication failures, the following minor changes were made:
- Document and refactor an existing authn switch.
- Remove an unused url definition for login_ajax + error.

BREAKING CHANGE: This changes /login_post and /login_ajax to return
400, rather than 200, when success=False in the returned JSON (for
non-SSO related authentication errors).

To remove risk around this change, it was added behind a waffle switch
named `user_authn.update_login_user_error_status_code`.

A breaking change was made, rather than introducing /login_ajax_new,
in order to more quickly get to our end goal of the current clean-up
effort of having a single function for login. If this breaks any
callers, we may fix or abandon this change altogether.

ARCH-1253
2019-11-25 09:53:43 -05:00
Zia Fazal
ec1825c755 Merge pull request #22345 from edx/ziafazal/ENT-1849-b
ENT-1849: Removed EnterpriseMiddleware
2019-11-25 17:22:40 +05:00
Matthew Piatetsky
6d2ed9d876 Merge pull request #22389 from edx/try_to_fix_remove_discount_from_track_selection
never give users discount unless they've seen the banner
2019-11-22 16:31:39 -05:00
Matthew Piatetsky
51ea129267 never give users discount unless they've seen the banner 2019-11-22 15:54:59 -05:00
adeelehsan
d506ecc99f Merge pull request #22318 from edx/aehsan/prod-987/fixing_oom_issue_for_notify_credentials
Fixing notify credentials job
2019-11-22 20:54:56 +05:00
Zaman Afzal
9b82185323 Revert "ENT-2454 Modify third party auth pipeline to update user enterprise (#22314)" (#22384)
This reverts commit 439e4b4169.
2019-11-22 20:46:36 +05:00