muhammad-ammar
f0aae8ecf5
* update DSC needed cache key to invalidate existing stored values
...
* refactor DSC logs
ENT-3494
2020-11-04 17:52:02 +05:00
muhammad-ammar
2cc0688e1c
convert enterprise customer uuid to str before comparison
...
ENT-3494
2020-11-03 00:20:05 +05:00
muhammad-ammar
5f04fd35a0
more logs for data sharing consent
...
ENT-3494
2020-11-02 20:24:44 +05:00
muhammad-ammar
b8a315933f
add log to get insights about why data sharing consent is not required
2020-10-29 20:57:27 +05:00
Muhammad Ammar
1d28f5d60f
Merge pull request #25447 from edx/ammar/enterprise-customer-session-storage
...
update logic to store learner's enterprise customer info in request session
2020-10-27 19:35:37 +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
Mike OConnell
0dc494360d
Correcting error with undeclared local ( #25422 )
...
Previous rollback introduced this error while resolving merge
conflicts. Line declaring the local variable was accidentally
omitted.
ENT-3494
2020-10-23 12:48:59 -04:00
Mike OConnell
64ee4a8972
Rolling back previous changes ( #25418 )
...
Rolling back previous changes after unexpected behavior
when testing in stage.
ENT-3494
2020-10-23 07:09:09 -04:00
Mike OConnell
b4f7647b40
Moco/ent 3494 ( #25408 )
...
* Added logging statements around DSC
Added logging statements to help diagnose failures in presenting
Data Sharing Consent views to learners who have not consented to
data sharing, but their enterprise requires it
ENT-3494
* Yet more logging statements around DSC
Added more logging statements to help diagnose failures in presenting
Data Sharing Consent views to learners who have not consented to
data sharing, but their enterprise requires it. These new logs provide
further detail into the call to the enterprise API to check for consent.
This changelist slightly changes the logic to determine if a consent
check is needed. The changes involve breaking out the conditions of the
iterated checks on the learner details to allow for more granular logging.
ENT-3494
2020-10-22 21:33:16 -04:00
Mike OConnell
fa435e697b
Added logging statements around DSC ( #25320 )
...
Added logging statements to help diagnose failures in presenting
Data Sharing Consent views to learners who have not consented to
data sharing, but their enterprise requires it
ENT-3494
2020-10-12 10:42:43 -04: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
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