feat: add boolean field to third_party_auth to be used to remove providers from enterprise selection

This commit is contained in:
Talia
2021-07-23 14:17:28 -04:00
parent 1238e5d1b4
commit 45772158bc
6 changed files with 42 additions and 4 deletions

View File

@@ -0,0 +1,28 @@
# Generated by Django 2.2.24 on 2021-07-23 15:27
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('third_party_auth', '0004_auto_20200919_0955'),
]
operations = [
migrations.AddField(
model_name='ltiproviderconfig',
name='disable_for_enterprise_sso',
field=models.BooleanField(default=False, help_text='IDPs with this set to True will be excluded from the dropdown IDP selection in the EnterpriseCustomer Django Admin form.', verbose_name='Disabled for Enterprise TPA'),
),
migrations.AddField(
model_name='oauth2providerconfig',
name='disable_for_enterprise_sso',
field=models.BooleanField(default=False, help_text='IDPs with this set to True will be excluded from the dropdown IDP selection in the EnterpriseCustomer Django Admin form.', verbose_name='Disabled for Enterprise TPA'),
),
migrations.AddField(
model_name='samlproviderconfig',
name='disable_for_enterprise_sso',
field=models.BooleanField(default=False, help_text='IDPs with this set to True will be excluded from the dropdown IDP selection in the EnterpriseCustomer Django Admin form.', verbose_name='Disabled for Enterprise TPA'),
),
]

View File

@@ -212,6 +212,16 @@ class ProviderConfig(ConfigurationModel):
default=False,
help_text="Use the presence of a profile from a trusted third party as proof of identity verification.",
)
disable_for_enterprise_sso = models.BooleanField(
default=False,
verbose_name='Disabled for Enterprise TPA',
help_text=_(
"IDPs with this set to True will be excluded from the dropdown IDP selection "
"in the EnterpriseCustomer Django Admin form."
)
)
prefix = None # used for provider_id. Set to a string value in subclass
backend_name = None # Set to a field or fixed value in subclass
accepts_logins = True # Whether to display a sign-in button when the provider is enabled