Commit Graph

5589 Commits

Author SHA1 Message Date
Waheed Ahmed
8abb3d70bb Allow entitlements to be used past the enrollment date.
Allow entitlements to be used to upgrade to verified track past the
course enrollment date and before the upgrade deadline

PROD-1497
2020-07-17 16:22:56 +05:00
Feanil Patel
e7fbc0c8e0 Merge pull request #21333 from open-craft/giovanni/bb-1471-upstream-custom-redirect
BB-1471: Add site configuration flag to allow changing default redirection after login
2020-07-16 10:30:07 -04:00
Giovanni Cimolin da Silva
8a143a4298 Add site configuration flag to allow changing redirection after login 2020-07-16 09:17:17 -03:00
Ali Akbar
205793755f Merge pull request #24476 from edx/aakbar/PROD-1850
removing logs, waffle flag and other older code
2020-07-15 23:34:29 +05:00
Binod Pant
167d8f278f ENT-3007 : round 2 API endpoints for samlproviderconfig and samlproviderdata (#24456)
* ENT-3007 auth/saml/v0/saml/providerdata and auth/saml/v0/saml/providerconfig endpoints

Move code to subfolder for samlproviderconfig

extra comma

undo accidental remove of import

GET works for a single config now

Use ModelViewSet to get all CRUD method. Test still fails

Add auth/saml/v0/providerdata endpoints

fixup reverse and test issue, remove leading caret

just triggering run, why is it failing in CI?

pycodelint fixes

Skip auth tests unless feature is on

Tests for post/put for samlproviderdata

move urls to their own folders

api tests for post samlprovierconfig

create 1 providerconfig test case

lint fixes

lint

lint

cleanup code local urls /samlproviderconfig works

note needed right now

Fix import errors

lint

unused import

wip: first attempt at rbac auth and jwt cookie in test

round 2 with enterprise uuid as url param for samlproviderconfig

improve tests, still dont pass

fix test by using system role, wip other test

fix create test

add get/post tests for providerdata

isort fixes

string lint fix

Cleanup based on feedback round1

move utils to tests package

Move util fn to openedx.feature area

lint

ENT-3007 : Round 2 of work on auth/saml/v0/providerconfig and auth/saml/v0/providerdata endpoints

* Fix test issue use string uuid for permission obj

* snake case changes provider_config

* snake case

* provider_data, tests and lint

* patch and delete tests for providerdata

* snake_case

* snake_case

* snake_case

* make patch test stronger

* 404 if invalid uuid for get param

* common util for validate uuid4

* unused import

* lint fixes for pycodestyle

* 400 when uuid is missing

* 400 instead of 404 for missing uuid

* spell fix

* update docstring for api usage

* docstring clarify
2020-07-15 10:34:26 -04:00
Ali-D-Akbar
8b857edd80 removing logs, waffle flag and other old data 2020-07-15 17:00:05 +05:00
Lael Birch
3c8630bdf4 Update edx-enterprise requirement
Unskip a test that the new version fixes
2020-07-14 09:53:07 -04:00
Talia
34f8954145 update to new edx-enterprise version 2020-07-10 14:59:33 -04:00
Feanil Patel
5470ce5805 Revert "ENT-3007 : Add auth/saml/v0/providerconfig|data CRUD endpoints for use in admin portal (#24298)"
This reverts commit 96ddcdc288.
2020-07-10 13:38:30 -04:00
Binod Pant
96ddcdc288 ENT-3007 : Add auth/saml/v0/providerconfig|data CRUD endpoints for use in admin portal (#24298)
* Add auth/samlproviderconfig CRUD endpoints for use in admin portal

Fixes: ENT-3007

* Move code to subfolder for samlproviderconfig

* extra comma

* undo accidental remove of import

* GET works for a single config now

* Use ModelViewSet to get all CRUD method. Test still fails

* Add auth/saml/v0/providerdata endpoints

* fixup reverse and test issue, remove leading caret

* just triggering run, why is it failing in CI?

* pycodelint fixes

* Skip auth tests unless feature is on

* Tests for post/put for samlproviderdata

* move urls to their own folders

* api tests for post samlprovierconfig

* create 1 providerconfig test case

* lint fixes

* lint

* lint

* cleanup code local urls /samlproviderconfig works

* note needed right now

* Fix import errors

* lint

* unused import

* wip: first attempt at rbac auth and jwt cookie in test

* round 2 with enterprise uuid as url param for samlproviderconfig

* improve tests, still dont pass

* fix test by using system role, wip other test

* fix create test

* add get/post tests for providerdata

* isort fixes

* string lint fix

* Cleanup based on feedback round1

* move utils to tests package

* Move util fn to openedx.feature area

* lint

* lint fix

* remove unused import
2020-07-10 11:23:13 -04:00
Feanil Patel
4ac2c5e92b Correct logic on building marketing links.
The logic used to has a special case for edge in the hostname which
didn't really make sense. So instead we just check to see if the given
url starts with http and if it does we return it directly.  If it doesn't,
then we try to convert it to a valid url and return that.  If that fails
we return .

Add a new custom metric `unresolved_marketing_link` to track when we
run into this scenario.
2020-07-09 15:09:38 -04:00
Feanil Patel
b6fdad2ea4 If this reverse failed, it was throwing a 500.
Catch the 500 in this case and throw a 404 instead.
2020-07-08 15:56:53 -04:00
Feanil Patel
e8a7529243 Merge pull request #24414 from edx/feanil/shoppingcart-remove-student-transfer-command-refs
DEPR-43 Remove shoppingcart certs refs.
2020-07-08 09:30:50 -04:00
Waheed Ahmed
4f80fd6540 Improve password reset rate limit.
Used django-ratelimit instead of django-ratelimit-backend
to configure two different rate limit configurations for same
endpoint.

PROD-1708
2020-07-08 16:19:07 +05:00
Feanil Patel
20687f9548 DEPR-43 Remove shoppingcart certs refs.
There's a chance that the whole management command should be removed since we
don't do change modes with the command anymore but that's a different problem
for a different day I think.
2020-07-07 16:54:21 -04:00
Ali-D-Akbar
b2755a35a0 optimize course enrollment count query 2020-07-06 12:47:46 +05:00
Michael Terry
3030efec78 AA-177: Add masquerading for course home MFE
- Looks at masquerading config for dates, outline, metadata, and
  celebration APIs in course_home_api / courseware_api.
- Consolidates and cleans up places we check whether masquerading
  gives us full access to a course.
2020-06-29 12:37:47 -04:00
Aarif
9e34cb3df9 Removed deprecated future imports (#24295) 2020-06-28 23:40:03 +05:00
Danial Malik
c962423bbc Replace track calls with eventtracking in task_track and server_track (#24282)
* Replace track calls with eventtracking in task_track and server_track

* Making  events compatible with events emitted via track app

* Fixed broken tests and quality violation

* Removed useless changes in shim. using  in  to have  and  keys in event context

Co-authored-by: zia.fazal@arbisoft.com <zia.fazal@arbisoft.com>
2020-06-26 13:49:16 -04:00
Matt Tuchfarber
4f1cd91113 Re-Add demographics prompt to edx.org theme (#24231)
- Add bootstrap utility function to lms-base-v1 CSS
- Moved coaching sass to edx.org theme
- Banner feature flag and MB program gated
- Fixes previous issue of changes specificity in button selector by
  resetting the style inside the component's class
2020-06-25 14:47:08 -04:00
Diana Huang
8a1fad8c12 Merge pull request #24181 from edx/diana/dashboard-courses-blocked
DEPR-43: Remove usage of CourseRegistrationCode and blocked courses from
2020-06-25 13:59:26 -04:00
Luis Moreno
5fe377cc77 Attempt to fix db sync problem for python3.8 2020-06-24 11:58:23 -04:00
morenol
8c53fa4a47 async is a keyword in python>=3.7 (#24265)
the new keyword async is causing errors when we run this with python 3.8.
https://docs.python.org/3/whatsnew/3.7.html

I tried in the first place, to change the definition of that value in the place where the context is defined, but it seems that it is taken from https://github.com/jazzband/django-pipeline,

This solves many problems for lms and cms tests that were making the jenkins workers get timeout.

That template have not seen changed since 2012, so I had to do additional changes in the templates in order to pass the xsslint checks:

mako-missing-default
mako-invalid-html-filter

I am not sure about the remove of the safe filter.

But I didn't found information about the 'safe' filter. It is probably that the now default 'h' filter is enough.
2020-06-24 11:55:03 -04:00
Diana Huang
6aa300711b Remove usage of CourseRegistrationCode and blocked courses from
dashboard.
2020-06-24 09:38:20 -04:00
Awais Qureshi
b4035bc71e BOM-1750
DeprecationWarning `callable is None` raised  since 3.5 throwing TypeError.
Fixed the assertion.
2020-06-24 01:43:09 +05:00
Aarif
27480cdd2f Removed deprecated future imports 2020-06-23 18:51:43 +05:00
Eric Herrera
3cdd5c4d27 Change some tests dict order to fix assertion after python 3.7 change of preserving insertion order in dicts. 2020-06-21 09:32:34 -05:00
Michael Terry
450072582e AA-137: Support courseware celebrations
- Add a new CourseEnrollmentCelebration model, which ties a
  course enrollment to some booleans about progress celebrations
- Add serialization of the new model to the existing courseware_api
  app's existing course info view
- Add new API in courseware_api to update a celebration model
2020-06-16 15:19:21 -04:00
Calen Pennington
c6695e0b6f Only actually reset user schedule if they have missed deadlines and not missed any gated content deadlines 2020-06-10 15:18:53 -04:00
Adeel Khan
2383fb3fa6 Improving user locked out logic.
This patch improves on the user locked
out logic by providing a helping message
near locked out. This would help reduce
retries by giving user the option to use
password reset flow to fix the issue.

PROD-1505
2020-06-09 09:36:42 +05:00
Albert (AJ) St. Aubin
e91c837173 Added Python API and renamed rest_api folder
[MICROBA-281]
2020-06-04 12:44:06 -04:00
Calen Pennington
fc21a337aa Use a fixed time for course duration limits, so that schedule extensions don't extend FBE duration limits 2020-05-26 16:29:28 -04:00
Feanil Patel
72ea1b7d4f Revert "Increase requests limit for logistration rate limit."
This reverts commit a1c018823d.
2020-05-21 11:40:47 -04:00
Waheed Ahmed
a1c018823d Increase requests limit for logistration rate limit. 2020-05-21 17:05:19 +05:00
Waheed Ahmed
c7f4e16470 Fix XSS lint issues for course_cta_text
PROD-1602
2020-05-21 12:51:07 +05:00
Ned Batchelder
68aceff860 Merge pull request #23968 from edx/nedbat/docs-progress
Update swagger.yaml, fix some markup errors
2020-05-16 14:50:35 -04:00
Jeremy Bowman
f17e12ba0e Remove shoppingcart from course about page - DEPR-43 (#23973)
Remove all references to the shoppingcart app from the course about page. Also removed one test of shoppingcart functionality from the student app.
2020-05-12 15:03:47 -04:00
Olivia Ruiz-Knott
f72a6556a9 MICROBA-311 Add US State field to UserProfile
Add list of states and field to UserProfile model; add migration; add
state field to relevant serializers and to
ACCOUNT_VISIBILITY_CONFIGURATION. Removes state data if country is
changed to something other than United States.
2020-05-12 13:55:11 -04:00
Ned Batchelder
cca33732ba Correct markup mistakes in api docs 2020-05-12 13:36:14 -04:00
Tim McCormack
9cff06d762 Address 1+N django_site queries on login page by comparing keys directly (#23947)
Rather than fetching the Site for every provider in a loop, just look at
the ID of the site.

Added regression test, showing N `django_site` requests before and 0 after.
2020-05-11 15:37:22 +00:00
Zia Fazal
d04f2735a1 Merge pull request #23934 from edx/ziafazal/ENT-2730
ENT-2730: Apply same username restrictions during SSO pipeline
2020-05-08 09:29:19 +05:00
zia.fazal@arbisoft.com
647da21191 Apply same username restrictions during SSO pipeline
Apply same username restrictions during SSO pipeline as we have user registeration flow to avoid SSO flow breakage at the time of user creation.
ENT-2730

Code quality fixes
2020-05-07 19:50:56 +05:00
Dave St.Germain
fedcf045eb Enable access role in django admin 2020-05-07 10:45:24 -04:00
Robert Raposa
b98d200fdc Revert "Dark launch: Fix site shadowing and 1+N queries in third party auth config fetching (#23824)" (#23935)
This reverts commit 79420640d5.
2020-05-07 09:38:54 -04:00
Michael Roytman
681c3ebed0 Merge pull request #23873 from edx/mroytman/MST-181-program-enrollment-sync-support-tool
MST-181: Add the ability to unlink and relink Program Enrollments via Support Tool to Address SSO Issues
2020-05-07 09:25:54 -04:00
Waheed Ahmed
c603111895 added another test case. 2020-05-07 15:14:31 +05:00
Waheed Ahmed
05d18effde Implement both IP and email based rate limiting. 2020-05-07 15:14:31 +05:00
Michael Roytman
38c255dbd2 Enhance the Link Program Enrollments Support Tool to handle the case of linking a learner to a ProgramEnrollment that is already linked to a different edX account.
In this case,
* unenroll the currently linked learner from the courses associated with related ProgramCourseEnrollments
* for each course the is enrolled in as part of a ProgramCourseEnrollment, if the coures has an audit track, then move the enrollment into the audit track. Otherwise, keep the learner's enrollment in the existing track.
* link the new user to the ProgramEnrollment
* enroll the new user in the Master's track in the courses associated with related ProgramCourseEnrollments
2020-05-06 10:15:42 -04:00
Tim McCormack
79420640d5 Dark launch: Fix site shadowing and 1+N queries in third party auth config fetching (#23824)
This performs a dark launch compare of the existing implementation
(still in use) for fetching TPA provider configs and a new
implementation, recording metrics on exceptions and mismatches.

The new implementation should have two benefits, once we're switched
over:

- Fix 1+N queries on login page view where the site for each config
  was fetched in a loop (ARCHBOM-1139)
- Don't allow configs with the same key on different sites to
  interfere with each other (regression test added)

The new impl does not use TieredCache, but only the request cache,
which we may want to adjust later.
2020-05-06 13:54:32 +00:00
Feanil Patel
a0f81a17ee Revert "Revert "We don't run into this case anymore so remove it."" 2020-05-05 11:49:18 -04:00