Commit Graph

71 Commits

Author SHA1 Message Date
Brittney Exline
1af80ff205 [ENT-3315] Reduce calls to enterprise-learner endpoint by looking up data from db 2020-08-12 15:24:39 -06:00
Adam Stankiewicz
00f4ea3fc3 fix keyerror with request.session (#24642)
* fix keyerror with request.session

* improve the conditional
2020-07-29 20:44:43 -04:00
Jeff Chaves
87f444fd44 ENT-3143: display message banner guiding user to their enterprise LP if enabled (#24625)
* display message banner guiding user to their enterprise LP if enabled

* adding new sass class name to use same styling as recovery email alert
2020-07-29 11:55:02 -04:00
Jeff Chaves
e1bd970b46 ENT-2894: Use new welcome template when redirected from enterprise proxy login view (#24587)
* using new welcome template when redirected from enterprise proxy login view

* enabling safe redirects to enterprise learner portal from login in devstack

* ading admin portal to login redirect whitelist

* running make upgrade to version bump edx-enterprise
2020-07-24 17:40:42 -04:00
Mike O'Connell
d191b52ee9 Check current enterprise for consent
When checking if consent is needed, ignore any enterprise
learner details that are not for the learner's currently
active enterprise.

ENT-3049
2020-06-29 12:57:03 -04:00
HammadAhmadWaqas
11893ad69e refactored imports from edx-django-utils 2020-04-20 12:11:28 +05:00
HammadAhmadWaqas
b4ebe11a6b removed get_cache_key and using it from edx-django-utils. 2020-04-13 12:51:39 +05:00
Aarif
6ee2089077 fixed warnings for wrong-import-order 2020-04-08 23:43:06 +05:00
hasnain.naveed
447f873924 ENT-2524 | Added the request META in exception traceback.
Only add `PATH_INFO` to log

removed METH from label too
2020-01-07 19:13:53 +05:00
Christian Clauss
6e8b4ccb08 Use ==/!= to compare str, bytes, and int literals
Identity is not the same thing as equality in Python so use ==/!= to compare str, bytes, and int literals. In Python >= 3.8, these instances will raise SyntaxWarnings so it is best to fix them now. https://docs.python.org/3.8/whatsnew/3.8.html#porting-to-python-3-8
2020-01-02 19:26:13 +01:00
Zaman Afzal
363a75cc99 ENT-2518 Fix Enterprise Login Page not showing to the user (#22602) 2020-01-01 15:18:45 +05:00
Feanil Patel
9cf2f9f298 Run 2to3 -f future . -w
This will remove imports from __future__ that are no longer needed.

https://docs.python.org/3.5/library/2to3.html#2to3fixer-future
2019-12-30 10:35:30 -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
Zia Fazal
e1cb10b41d Removed EnterpriseMiddleware
EnterpriseMiddleware set value of user's enterprise customer in session. In order to get value of enterprise customer it calls `enterprise/api/v1/enterprise-learner` API. Sometimes this middleware is called many times which result in many call to the under lying API and throttling of API causes 429 http errors.
We are not removing that middleware and storing value of user's enterprise customer in session inside underlying method.
ENT-1849

Removed pdb statement
2019-11-19 10:45:58 +05:00
Zia Fazal
5b6e0514de Added caller in to the exception message
Added caller in to the exception message to debug ENT-1849
Replaced `get_enterprise_learner_data` method call with `enterprise_customer_for_request` to get enterprise customer data from cache or session instead of hitting API.
2019-11-11 19:44:24 +05:00
hasnain-naveed
057f443a26 ENT-2437 | get_enterprise_customer_for_learner method replaced with enterprise_customer_for_request. 2019-11-08 15:47:52 +05:00
Manjinder Singh
79c9231128 Revert "ENT-2437 | get_enterprise_customer_for_learner method replaced with e…" (#22248) 2019-11-05 16:51:44 -05:00
hasnain-naveed
4b827d5be0 ENT-2437 | get_enterprise_customer_for_learner method replaced with enterprise_customer_for_request. 2019-11-01 17:19:56 +05:00
Zia Fazal
7ccd2a6901 Refactored enterprise unlink code to fix ENT-1890
Refactored enterprise unlink code to fix ENT-1890

Fixed quality violations and brokent test

Fixed pylint quality violations

Fixed failing unit test

Fixed broken test after rebasing with master
2019-10-23 11:35:58 +05:00
Matt Tuchfarber
4e1877670e Check if enterprise matches site before consent
We don't support enterprises with catalogs that span sites, so we can
safely ignore checking for consent when the site a learner is viewing a
course in is different than the enterprise that the learner is linked
to.
2019-06-24 14:30:59 -04:00
Brittney Exline
52d03626e2 Version bump for edx-enterprise 2019-06-17 14:28:05 -06:00
George Babey
fb0a4220a7 Revert "Version bump for edx-enterprise"
This reverts commit bf88bca776.
2019-06-16 15:22:09 -04:00
Brittney Exline
bf88bca776 Version bump for edx-enterprise 2019-06-14 13:57:01 -06:00
Michael Youngstrom
e868c54a18 INCR-176 2019-04-26 15:42:24 -04:00
Nimisha Asthagiri
5acbb10e7c Account API: enforce Enterprise policy on backend 2019-04-24 22:37:26 -04:00
Matt Drayer
04aa7495ea Downgrade log level from warning to info for expected consent gating workflow. 2019-04-10 11:22:19 -04:00
Hammad Ahmad Waqas
974a937f70 session is replaced with cache to hold data_sharing_consent_needed
flag value
added signal to destroy data_sharing_consent_needed flag if user is
is enrolled in enterprise course.
2019-04-05 18:06:54 +05:00
Matthew Piatetsky
444799fb0e fix unicode strings in openedx/ part 2 2019-02-15 10:15:51 -05:00
Nimisha Asthagiri
dc56a63e03 Remove deprecated JwtBuilder
ARCH-248
2018-10-17 07:43:59 -04:00
Nimisha Asthagiri
02ba5fb0e8 Login service support for JWT Cookies 2018-10-01 13:08:40 -04:00
Jeremy Bowman
3ff3eee2f2 TE-2689 Remove useless pylint suppressions part 4 2018-08-20 12:54:22 -04:00
Eric Fischer
247bb50ed2 s/django.core.urlresolvers/django.urls/g
Django 1.10 deprecation fix for Hackathon XIX
Addresses PLAT-1397
2018-06-05 13:59:09 -04:00
Eric Fischer
e18448e27d Silence deprecation warnings
https://docs.djangoproject.com/en/1.11/releases/1.10/#using-user-is-authenticated-and-user-is-anonymous-as-methods
2018-05-02 10:03:50 -04:00
Uman Shahzad
5746729895 Revert "Revert "Show Enterprise display name if we should hide sensitive user…" 2018-04-23 18:27:36 +05:00
Uman Shahzad
87919f4d53 Add Enterprise middleware that injects customer data. 2018-04-21 08:14:52 +05:00
Hasnain
3fca1af171 WL-1518 | Get decline notification context from enterprise. 2018-04-18 15:00:47 +05:00
George Babey
a155aad01c Revert "Show Enterprise display name if we should hide sensitive username."
This reverts commit d58bd06928.

This commit caused performance issues due to increased API load from checking the
enterprise association on each page load
2018-04-17 09:07:17 -04:00
Uman Shahzad
d58bd06928 Show Enterprise display name if we should hide sensitive username. 2018-04-12 19:10:30 +05:00
Ibrahim
45831a07f0 Modify Enterprise API to accept list of course_ids for consent_required endpoint
WL-1491
2018-03-28 18:03:07 +05:00
Saleem Latif
26cc70a7bc Move enterprise specific code in student_account views to enterprise_support 2018-01-01 16:08:41 +05:00
Ned Batchelder
e23e3a0486 Fix a number of unused-import pylint violations 2017-11-21 19:57:06 -05:00
asadiqbal
e5c55a8945 ENT-729 2017-11-16 16:28:31 +05:00
Douglas Hall
f3da3b241c Added logging to help debug Enterprise API issue. 2017-11-14 10:00:48 -05:00
Jillian Vogel
1b63bd9cd7 Merge pull request #16155 from open-craft/jill/enable_enterprise_integration
Lets ENABLE_ENTERPRISE_INTEGRATION be configurable
2017-10-23 20:09:43 +10:30
Bill Filler
9ed51381f3 Pass course name to template
WL-1279
2017-10-19 15:51:39 -04:00
Jillian Vogel
425239a509 Disables Enterprise Integration feature by default
Moves ENABLE_ENTERPRISE_INTEGRATION to settings.FEATURES,
and changes the default value to False.
2017-10-19 15:58:13 +10:30
Douglas Hall
2062dd8629 Fix get_enterprise_customer api cache key.
ENT-704
2017-10-13 14:43:12 +05:00
Uman Shahzad
2601b26af6 Update mocks/docs/code to reflect Enterprise API updates. 2017-10-11 02:05:04 +05:00
Bill Filler
5268588980 Display banner if user declines data sharing consent
Revert changes for getting enterprise customer from enteprise from
Enterprise API and update/add test.
Lookup the enterprise_customer_uuid based on the site and user if not
found through the cookie or request parameter.
2017-10-04 11:27:16 -04:00