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
This commit is contained in:
@@ -10,7 +10,7 @@ from django.conf import settings
|
||||
from django.urls import NoReverseMatch, reverse
|
||||
from django.utils.translation import ugettext as _
|
||||
from edx_django_utils.cache import TieredCache, get_cache_key
|
||||
from enterprise.models import EnterpriseCustomerUser
|
||||
from enterprise.models import EnterpriseCustomerUser, EnterpriseCustomer
|
||||
from social_django.models import UserSocialAuth
|
||||
|
||||
import third_party_auth
|
||||
@@ -342,3 +342,7 @@ def get_provider_login_url(request, provider_id, redirect_url=None):
|
||||
redirect_url=redirect_url if redirect_url else get_next_url_for_login_page(request)
|
||||
)
|
||||
return provider_login_url
|
||||
|
||||
|
||||
def fetch_enterprise_customer_by_id(enterprise_uuid):
|
||||
return EnterpriseCustomer.objects.get(uuid=enterprise_uuid)
|
||||
|
||||
Reference in New Issue
Block a user