Commit Graph

59 Commits

Author SHA1 Message Date
muhammad-ammar
3929d098b6 update cache key for dsc 2021-04-06 17:34:42 +05:00
Awais Qureshi
b5a6580ecc BOM-2442
pyupgrade in enterprise-support.
2021-03-12 12:39:48 +05:00
Awais Qureshi
d24f79a264 BOM-2442
pyupgrade in enterprise_support
2021-03-11 14:54:23 +05:00
Aarif
93a4f96e30 replaced unittest assertions pytest assertions (#26575) 2021-02-22 16:19:37 +05:00
Zainab Amir
c260f72c2e VAN-311: Add multiple enterprise support for Authn MFE (#26526) 2021-02-18 17:24:44 +05:00
Awais Qureshi
5ea60327b1 BOM-2336
Apply pylint-amnesty.
2021-02-04 16:49:47 +05:00
Saleem Latif
dfb36644c9 Upgraded edx-enterprise version to 3.15.0 and updated field name changed in that version. 2020-12-15 19:13:14 +05:00
muhammad-ammar
f19b074927 try to get learner's enterprise information from DB if there is no
enterprise customer associated with sso provider id

ENT-3670
2020-12-02 19:49:21 +05:00
Alex Dusenbery
2204caaa6b ENT-3503 | Adds more unit tests for enterprise_support.api, and one TODO for same. 2020-11-23 11:42:36 -05:00
Kyle McCormick
151bd13666 Use full names for common.djangoapps imports; warn when using old style (#25477)
* Generate common/djangoapps import shims for LMS
* Generate common/djangoapps import shims for Studio
* Stop appending project root to sys.path
* Stop appending common/djangoapps to sys.path
* Import from common.djangoapps.course_action_state instead of course_action_state
* Import from common.djangoapps.course_modes instead of course_modes
* Import from common.djangoapps.database_fixups instead of database_fixups
* Import from common.djangoapps.edxmako instead of edxmako
* Import from common.djangoapps.entitlements instead of entitlements
* Import from common.djangoapps.pipline_mako instead of pipeline_mako
* Import from common.djangoapps.static_replace instead of static_replace
* Import from common.djangoapps.student instead of student
* Import from common.djangoapps.terrain instead of terrain
* Import from common.djangoapps.third_party_auth instead of third_party_auth
* Import from common.djangoapps.track instead of track
* Import from common.djangoapps.util instead of util
* Import from common.djangoapps.xblock_django instead of xblock_django
* Add empty common/djangoapps/__init__.py to fix pytest collection
* Fix pylint formatting violations
* Exclude import_shims/ directory tree from linting
2020-11-10 07:02:01 -05:00
muhammad-ammar
5adf9fdd8b store a learners enterprise customer info into request session only if
user is authenticated. This is needed to avoid storing `None` as
enterprise customer info in request session.
2020-10-27 19:12:01 +05:00
Alex Dusenbery
3292104470 enterprise_customer_uuid_for_request() should not return a __CACHE_MISS__. 2020-09-29 12:03:33 -04:00
Alex Dusenbery
de277ce46b Prevent an unbound local variable exception in enterprise_support.api. Add more unit tests for same. 2020-09-22 11:15:17 -04:00
Alex Dusenbery
4ad2df083d Ensure that get_enterprise_learner_portal_enabled_message() returns None when there is no associated enterprise customer for the given request. Add unit tests for this function. 2020-09-21 12:47:00 -04:00
Alex Dusenbery
4bb1914ec6 ENT-3367 | Show at most 1 Enterprise Learner Portal dashboard link in the header user-menu. Also, guard against no branding config when getting learner portal data. 2020-09-18 10:23:32 -04:00
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
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
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
046feb0cf0 Merge pull request #22649 from edx/feanil/fix_pep8
Fix all E303 pep8 errors.
2019-12-30 13:32:26 -05:00
Feanil Patel
6e3fe00fff Fix all E303 pep8 errors. 2019-12-30 12:25:38 -05:00
Feanil Patel
2df8b8226b Merge pull request #22643 from edx/feanil/2to3_asserts
Run `2to3 -f asserts . -w` on edx-platform.
2019-12-30 12:13:42 -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
Feanil Patel
70294b0ad2 Run 2to3 -f asserts . -w on edx-platform.
https://docs.python.org/3.5/library/2to3.html#2to3fixer-asserts
2019-12-30 10:22:19 -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
Ayub khan
298fbdaec2 BOM-894 python3 order mismatch
Python3 arguments have different positions as compared to python2
2019-10-09 15:06:27 +05:00
Jeremy Bowman
553d35e53e Upgrade mock BOM-596 (#21717) 2019-09-24 10:14:17 -04: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
Michael Youngstrom
e868c54a18 INCR-176 2019-04-26 15:42:24 -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
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
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
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
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
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
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
zubair-arbi
4040c45f06 update enterprise api support for request users and enterprise service user
ENT-624
2017-09-27 18:04:44 +05:00
Douglas Hall
610a4100af Revert "Initialize enterprise api client with provided user" 2017-09-20 09:55:02 -04:00
zubair-arbi
16120efaeb Initialize enterprise api client with provided user
ENT-624
2017-09-19 14:56:43 +05:00
Jeremy Bowman
6fb7d63c9e Fixes for test order dependence 2017-09-06 11:31:37 -04:00
Jesse Shapiro
7a31441ebc Move to new consent API 2017-08-16 22:58:09 -04:00
Jesse Shapiro
3517c1d978 Add pipeline check for linked enterprise 2017-07-26 13:51:26 -04:00