Commit Graph

5138 Commits

Author SHA1 Message Date
Mike O'Connell
c242ed6aca Add existence check on secondary email
Moves the existence check for secondary (recovery) email to validate
method. If the email already exists, silently remove it from the set of
data to be updated. This parallels the existing behavior for updating
the primary email.

ENT-1913
2020-02-24 13:03:09 -05:00
Robert Raposa
372d2e927c BOM-1264: add third-party-auth scope and usage (#23135)
* WIP: add third-party-auth scope and usage

BOM-1264


* Fix tests now that we do permissions in a more standard way.

Rather than manually setting the permission class we previously
explicitly raised a PermissionDenied exception.  The way DRF
permissoning logic works, if we use the WWW-Authenticate header in the
highest priority auth class, it will return a 401 instead of a 403.


* Added test to make sure having permissions gives access to user mapping api

* Test new filters logic.

Ensure that the filters we add to the application access model make it
into the JWT correctly.

* quality fix

* quality fix

* disable pylint warning

* quality fix

* fix indent prob

Co-authored-by: Feanil Patel <feanil@edx.org>
Co-authored-by: Manjinder Singh <49171515+jinder1s@users.noreply.github.com>
2020-02-21 11:25:28 -05:00
Samuel Walladge
39de23c666 Add flag to enable password change form in admin
This was previously disabled because changing another user's password is
both not usually recommended and bypasses password policy. Here, we add
a feature flag (`ENABLE_CHANGE_USER_PASSWORD_ADMIN`) to allow
re-enabling this password change form. This allows continued use of this
functionality by clients that require it.
2020-02-21 11:22:10 +10:30
Dave St.Germain
00f5beb66f Merge pull request #22992 from edx/dcs/perf-vertical
Improve Vertical Performance
2020-02-20 12:30:22 -05:00
Dave St.Germain
a5b0f71108 Several optimizations for improving vertical rendering performance. 2020-02-20 11:41:21 -05:00
Thomas Tracy
80320ab7a0 Add phone_number field to UserProfile model (#23132)
Adds a simple nullable field to the UserProfile model. The only
validation done it to make sure any character saved in that field is a
digit and not a letter. We do not distiguish on a model level if the
phone number is international or not.
2020-02-20 10:52:46 -05:00
Mike O'Connell
bc99a31738 Merge branch 'master' into ENT-2607-2 2020-02-19 14:01:28 -05:00
Dave St.Germain
592b34b998 Merge pull request #21158 from eduNEXT/lmm/add_currency_choose_template
Setting template to show currency defined in the course mode DB record
2020-02-19 11:46:49 -05:00
Manjinder Singh
d7bd80a100 Renamed OAuth2Authentication to BearerAuthentication (#23128)
* Renamed OAuth2Authentication to BearerAuthentication
* Added back OAuth2Authentication name
-there are libraries such as edx-enterprise that still import OAuth2Authentication.  The OAuth2Authentication class should be fully removed when everything is importing BearerAuthentication correctly
2020-02-18 13:29:29 -05:00
Diego Millan
2dd128bce0 Setting template to show currency defined in the course mode DB record 2020-02-17 11:45:50 -04:00
Mike O'Connell
7d67dcfb59 Don't update account recovery until after activation
Corrected PEP8 errors

ENT-2607
2020-02-14 14:23:27 -05:00
Mike O'Connell
e5e96c9dde Don't update account recovery until after activation
Rather than to create or update the account recovery record when the
Account Settings page is updated, defer updating until the new
recovery email is confirmed

ENT-2607
2020-02-14 09:59:36 -05:00
Nathan Sprenkle
c66176da13 Add error reporting to UI for CSV team management (#23035)
* Add error banner for upload memberships errors

* Edit error message language

* Fix linter warnings
2020-02-14 09:58:58 -05:00
Kyle McCormick
234eedd8c6 Handle next and course_id in /login_ajax
Currently, the /login_ajax endpoint does not regard
any `next` or `course_id` parameters. This commit changes
that, sharing the logic that /login (which the current
templated login page uses) employs to cacluate
a redirect-after-login URL based on `next` and `course_id`.

The new functionality is behind ENABLE_LOGIN_MICROFRONTEND.
2020-02-13 12:24:51 -05:00
Jeremy Bowman
e1d1c29c00 Fix DRF deprecation warnings (#23082)
Fix all deprecation warnings generated by Django REST Framework during the unit tests:

* ``The `base_name` argument is pending deprecation in favor of `basename`.`` (86 occurrences)
* `` `detail_route` is deprecated and will be removed in 3.10 in favor of `action`, which accepts a `detail` bool. Use `@action(detail=True)` instead.`` (18 occurrences)
2020-02-12 12:51:40 -05:00
Diana Huang
f6f77d19ba Merge pull request #23022 from edx/diana/remove-tracking-log-backend
Drop tracking log table.
2020-02-11 11:42:59 -05:00
Manjinder Singh
cce8cdd661 Replacing OAuth2Auth (#23067)
- Removing deprecated auth classes
- Replacing OAuth2AuthenticationAllowInactiveUserDeprecated with OAuth2AuthenticationAllowInactiveUser
- the old class was a child class of a deprecated class that we are removing and replacing.
2020-02-11 10:38:13 -05:00
Diana Huang
67ecee91e4 Drop tracking log table. 2020-02-11 09:34:26 -05:00
Ayub-khan
d3a02bc3e5 BOM-1121
-Updated middleware setting to use use middleware insted of
middleware_classes
-github install of django-method-override fork to support
new style middleware in django1.11
2020-02-11 14:35:26 +05:00
Jeremy Bowman
59768e7498 Fix more deprecation warnings (#23061) 2020-02-10 13:17:25 -05:00
David Ormsbee
76a7d40065 Merge pull request #23047 from edx/ormsbee/update_config_models
Python upgrades (django-config-models v2)+
2020-02-10 09:13:10 -05:00
Zia Fazal
26891841e4 Merge pull request #22987 from edx/ziafazal/ENT-2269
ENT-2269: Added ability to logout from IDP when logout flow is triggered from learner portal
2020-02-10 12:53:41 +05:00
David Ormsbee
b134228954 Python upgrades (django-config-models v2)+
Some tests that used to mock the cache internals of ConfigurationModels
had to be modified to use CacheIsolationTestCase instead (the things
they were mocking no longer exist).
2020-02-09 20:37:45 -05:00
zia.fazal@arbisoft.com
d7ed021b8d Added ability to logout from IDP
Logout link should be displayed only for learner portal

Added changed to display only for learner portal
Added unit tests

check third_party_auth is enabled

Changes to extend SSO logout link feature to Oauth providers

Fixed quality violations

Removed unncessary assert

Reviewer feedback changes
2020-02-07 19:38:36 +05:00
Muhammad Soban Javed
6dfcddd6d8 Merge pull request #23030 from edx/BOM-1251
Fixing deprecated django-filter features
2020-02-07 18:45:30 +05:00
Manjinder Singh
cea795b02e Added new auth class (#23018)
* Added new auth class

- Created new class called OAuth2AuthenticationAllowInactiveUser, which replaces old class with same name
- Renames previous  OAuth2AuthenticationAllowInactiveUser to  OAuth2AuthenticationAllowInactiveUserDeprecated
- Replaced all imports of  OAuth2AuthenticationAllowInactiveUser to call deprecated class instead
- testing new class in discussion(added flag based on django setting)
2020-02-06 10:37:27 -05:00
Calen Pennington
b1d5ad8dcb Merge pull request #23024 from cpennington/fix-edx-when-date-ingest
Correctly wire in signal the new course_date_signals app so that it a…
2020-02-06 09:56:08 -05:00
Calen Pennington
4901dde748 Clean up pylint errors to get diff-quality to pass 2020-02-06 09:18:30 -05:00
iamsobanjaved
82dd040382 fixed deprecated django-filter features 2020-02-06 18:32:36 +05:00
Diana Huang
1f45181c14 Remove ENABLE_SQL_TRACKING_LOGS and all associated code. 2020-02-05 14:42:33 -05:00
Diana Huang
742868c2da Remove the tracking django backend and the TrackingLog tables. 2020-02-04 14:24:56 -05:00
Robert Raposa
28206e4c45 add jwt auth to third-party auth endpoint
BOM-897
2020-02-04 10:02:04 -05:00
Zainab Amir
4b458099cf Add unique_together to CourseEntitlement (#22948)
Add unique_together on course_uuid and order_number to avoid
duplicate records

PROD-1064
2020-02-03 13:21:44 +05:00
Dave St.Germain
42adb72aa5 Merge pull request #22336 from edx/dcs/data-researcher
Add new role for course data researcher
2020-01-31 10:07:27 -05:00
Uzair Rasheed
76052ee9ba Merge pull request #22921 from edx/PROD-1142/add-check-for-grade-display
Add additional check for grade display on course banner.
2020-01-31 15:25:39 +05:00
Awais Jibran
2f98463c35 Merge pull request #22939 from edx/aj/fix-grade-reports
Generate Grade Report for Verified Learners by Default
2020-01-31 12:47:18 +05:00
George Babey
aced705091 Merge pull request #22983 from edx/gbabey/bulk-update-emails
Adds management command for bulk updating email addresses
2020-01-30 21:46:43 -05:00
George Babey
efdbe1f3b1 Adds management command for bulk updating email addresses
This PR adds a management command that will update the email address
of the given accounts provided through a CSV file.

This is necessary internally at edX to update a number of internal accounts
which are using sibling email addresses and would be locked out after we
enforce SSO.
2020-01-30 21:11:04 -05:00
Manjinder Singh
eb694528e7 Adding metrics to oauth2authentication class (#22970)
Currently, we are working on removing the rest_framework_auth library from edx-platform. For this push, we need to remove the oauth2Authentication class. This PR creates a new class oauth2AuthenticationDeprecated that adds additional new relic metrics. The metrics would allow us to see how often this class is used and its success rate. The hope is that this information will help us with transitioning to a different authentication class.
2020-01-30 09:13:51 -05:00
Aarif
97d327feeb BOM-1121
Old style mixin compatibility with django2.2
2020-01-30 16:36:02 +05:00
uzairr
b99aeda628 Add additional check for grade display on course banner.
PROD-1142
2020-01-30 15:34:46 +05:00
Awais Jibran
d7d258cd36 Generate grade report for verified learnes by default 2020-01-28 14:04:02 +05:00
Dave St.Germain
6a5a620325 Add a data researcher role for everyone who is currently staff or instructor. 2020-01-27 14:15:41 -05:00
Dave St.Germain
3d82ce18f9 Check for data download permission in report endpoints 2020-01-27 13:55:18 -05:00
Dave St.Germain
8b815b802b Added new role for course data researcher. 2020-01-27 13:55:18 -05:00
adeelehsan
4799f40d88 Merge pull request #22916 from edx/aehsan/prod-799/remove_order_history_from_dashboard
Order history removed from dashboard
2020-01-27 15:00:46 +05:00
Waheed Ahmed
2d04b7980a Fix already earned honor PDF certificates.
Learner who have already earned PDF honor certificates in old courses
are unable to see the certificate links on dashboard and course progress
pages since `course.cert_html_view_enabled` is deprecated and default to
True for all courses.

PROD-60
2020-01-27 14:17:18 +05:00
adeelehsan
7f11afafdc Order history removed from dashboard
PROD-799
2020-01-23 17:10:12 +05:00
hunytalk
73aae081c3 Remove null, blank from start field in Schedules 2020-01-22 18:10:33 +05:00
Adam Butterworth
ca1dfbce70 fix: fragment include directive should include files in themes if they exist (#22880) 2020-01-17 09:00:03 -05:00