Commit Graph

122 Commits

Author SHA1 Message Date
Alex Dusenbery
c69fb5b274 ENT-2892 | Bump edx-enterprise to 3.4.36. This version removes some model field references, but does not create a migration, to the test to check that migrations are in sync has been skipped here. 2020-08-04 14:24:56 -04:00
Jeff LaJoie
a2d2646ee5 Merge pull request #24634 from edx/jlajoie/enterprise-header-caching-fix
Fixes session caching for enterprise portal links by only caching for auth'd learners
2020-07-30 10:33:40 -04:00
Jeff LaJoie
4282530faf Fixes session caching for enterprise portal links by only caching for auth'd learners 2020-07-30 09:18:35 -04: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
Jeff LaJoie
bf11b68fda ENT-2893: Updates header branding and href for Enterprise learners 2020-07-17 08:59:43 -04: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
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
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
muhammad-ammar
4a3eb16296 override enrollment attributes for learners
ENT-2998
2020-06-24 21:37:24 +05:00
Manjinder Singh
566765f919 Removing flaky test (#24262) 2020-06-19 12:13:52 -04:00
hasnain.naveed
c51dc9db20 ENT-2818 | Added enterprise slug login's url on edx login page. 2020-05-28 19:58:46 +05:00
Aarif
98af9ce418 remove useless-supression warnings 2020-05-01 19:42:15 +05: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
zia.fazal@arbisoft.com
f56235248a Improved enterprise target regex
Improved enterprise target regex to include missing
/enterprise/handle_consent_enrollment/{uuid}/course/ endpoint.
ENT-2710
2020-04-06 12:27:44 +05:00
HammadAhmadWaqas
c09b382e52 fixing flakiness of tests due to redundant id created by faker. 2020-04-03 12:50:47 +05:00
HammadAhmadWaqas
b99977a3cb added management command to push old enrollments to ecommerce 2020-02-26 17:41:05 +05:00
zia.fazal@arbisoft.com
2453bc8c05 Stop showing hitting enterprise API in case of 404 error
Stop showing hitting enterprise API when request is originated as result of 404 error.

fixed quality violations

Removed line break

add unit tests

Updated test docstring
2020-02-14 15:16:51 +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
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
Zaman Afzal
c07268d1b5 Fix the broken privacy page link url on enterprise login page (#22528) 2019-12-30 14:57:28 +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
Manjinder Singh
d6bfa03993 Removing flaky tests (#22328)
These tests fail intermittently. The related jira ticket to remove flaky test can be found at: https://openedx.atlassian.net/browse/ENT-2479

The tests fail with error log output of: SafeCookieData BWC parse error: 'm3i1v99yuohzsbyjhfp4i9nktjrq4i05'
The error seems to be something to do with safe_cookie_string
2019-11-14 16:29:51 -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
Muhammad Ammar
19fd375dc9 Merge pull request #22012 from edx/ammar/ent-1964-allow-user-to-edit-fullname-if-no-social-auth-record
allow user to edit fullname if no social auth record exists
2019-10-21 11:35:26 +05:00
muhammad-ammar
fc2915b02f allow user to edit fullname if no social auth record
ENT-1964
2019-10-18 15:30:51 +05:00
Zia Fazal
ebe29d9303 Merge pull request #21943 from edx/ziafazal/ENT-1688
ENT-1688: Changed logout message on on logout screen for Enterprise SSO flow
2019-10-15 18:53:34 +05:00
Zia Fazal
c718c02d6e Show blank screen instead of logout message for Enterprise SSO flow
Changes to show blank screen instead of logout message for Enterprise SSO flow. It confuses learner when they are already signed in and access their course from B2B site.
ENT-1688

Fixed pep8 quality violation

use testserver as HOST instead of edx.org

assert enterprise app is enabled

added logging

Print different values

Reload django url config

assert all quote operations to see how they work on jenkins

debug url resolved values

login user in setup

added log to debug test on jenkins

Using UrlResetMixin

Using regex instead of resolve

Fixed quality violation

Fixed pylint quality violations

Fixed target interpolation syntax

Added developer's comment
2019-10-15 18:28:19 +05:00
Zia Fazal
3b69a4f279 Invoke learner transmission task only for enterprise learners
Invoke learner transmission task only for enterprise learners
ENT-2384

added docstring

Fixed brokent unit test
2019-10-15 15:58:37 +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
Zia Fazal
19436f8d3d Bumped edx-enterprise version to 1.10.7
Fixed broken unit test

connected COURSE_GRADE_NOW_PASSED at the end

added receiver to signal connect call
2019-09-25 22:32:53 +05:00
Zia Fazal
b73979dc72 Added signal handler for COURSE_GRADE_NOW_PASSED
Added signal handler for COURSE_GRADE_NOW_PASSED to trigger single learner data transmission task in edx-enterprise.

Bumped edx-enterprise version to 1.10.7

Revert edx-enterprise version bump
2019-09-25 14:30:49 +05:00
Jeremy Bowman
553d35e53e Upgrade mock BOM-596 (#21717) 2019-09-24 10:14:17 -04:00
Feanil Patel
4eaf875741 BOM-621 Fix hashing in a bunch of places. 2019-09-19 15:53:39 -04:00