Skip to content

Commit c7a31a1

Browse files
marslanabdulraufpdpinch
authored andcommitted
fix: find and match enterprise user only if enterprise is enabled (openedx#36958)
Co-authored-by: Peter Pinch <pdpinch@mit.edu> (cherry picked from commit 709ad82)
1 parent 59d7545 commit c7a31a1

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

common/djangoapps/third_party_auth/pipeline.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -776,6 +776,7 @@ def associate_by_email_if_saml(auth_entry, backend, details, user, strategy, *ar
776776
777777
This association is done ONLY if the user entered the pipeline belongs to SAML provider.
778778
"""
779+
from openedx.features.enterprise_support.api import enterprise_is_enabled
779780

780781
def get_user():
781782
"""
@@ -784,6 +785,7 @@ def get_user():
784785
user_details = {'email': details.get('email')} if details else None
785786
return get_user_from_email(user_details or {})
786787

788+
@enterprise_is_enabled()
787789
def associate_by_email_if_enterprise_user():
788790
"""
789791
If the learner arriving via SAML is already linked to the enterprise customer linked to the same IdP,

0 commit comments

Comments
 (0)