Skip to content

Commit 1001472

Browse files
committed
squash
1 parent 87475aa commit 1001472

2 files changed

Lines changed: 20 additions & 1 deletion

File tree

common/djangoapps/third_party_auth/models.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,25 @@ def get_register_form_data(cls, pipeline_kwargs):
357357

358358
return registration_form_data
359359

360+
def get_registration_field_overrides(self):
361+
"""
362+
Get registration field visibility/requirement overrides for this provider.
363+
364+
This allows providers to configure whether certain fields
365+
(like marketing_emails_opt_in or research) should be required,
366+
optional, or hidden on the registration form.
367+
368+
Returns:
369+
dict: Mapping of field names to settings ("required", "optional", "hidden")
370+
Returns empty dict if no overrides are configured.
371+
372+
Note:
373+
This is a base implementation that returns an empty dict.
374+
Subclasses like SAMLProviderConfig may override this to provide
375+
actual field override configuration.
376+
"""
377+
return {}
378+
360379
def get_authentication_backend(self):
361380
"""Gets associated Django settings.AUTHENTICATION_BACKEND string."""
362381
return f'{self.backend_class.__module__}.{self.backend_class.__name__}'

common/djangoapps/third_party_auth/saml.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class SAMLAuthBackend(SAMLAuth): # pylint: disable=abstract-method
3333
def get_idp(self, idp_name):
3434
""" Given the name of an IdP, get a SAMLIdentityProvider instance """
3535
from .models import SAMLProviderConfig
36-
return SAMLProviderConfig.current(idp_name).get_config(self)
36+
return SAMLProviderConfig.current(idp_name).get_config()
3737

3838
def setting(self, name, default=None):
3939
""" Get a setting, from SAMLConfiguration """

0 commit comments

Comments
 (0)