Merge pull request #30097 from openedx/asheehan-edx/ENT-5484-SAML-identity-provider-is-valid

feat: new is_valid field for provider configs
This commit is contained in:
Alexander J Sheehan
2022-03-21 11:50:24 -04:00
committed by GitHub
2 changed files with 26 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
# Generated by Django 3.2.12 on 2022-03-21 14:55
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('third_party_auth', '0006_auto_20220314_1551'),
]
operations = [
migrations.AddField(
model_name='samlproviderconfig',
name='was_valid_at',
field=models.DateTimeField(blank=True, help_text='Timestamped field that indicates a user has successfully logged in using this configuration at least once.', null=True),
),
]

View File

@@ -700,6 +700,14 @@ class SAMLProviderConfig(ProviderConfig):
blank=True,
)
was_valid_at = models.DateTimeField(
blank=True,
null=True,
help_text=(
"Timestamped field that indicates a user has successfully logged in using this configuration at least once."
)
)
def clean(self):
""" Standardize and validate fields """
super().clean()