Skip to content

Commit

Permalink
feat: add marked_authorized flag to SSO config
Browse files Browse the repository at this point in the history
chore: bump version to 4.8.6
  • Loading branch information
marlonkeating committed Dec 5, 2023
1 parent bae4c25 commit 97c9128
Show file tree
Hide file tree
Showing 6 changed files with 89 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ Change Log
Unreleased
----------

[4.8.6]
--------
feat: add marked_authorized flag to SSO config

[4.8.5]
--------
feat: Added a management command to assign skills to Degreed courses
Expand Down
2 changes: 1 addition & 1 deletion enterprise/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
Your project description goes here.
"""

__version__ = "4.8.5"
__version__ = "4.8.6"
23 changes: 23 additions & 0 deletions enterprise/migrations/0195_auto_20231130_1837.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Generated by Django 3.2.23 on 2023-11-30 18:37

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('enterprise', '0194_auto_20231013_1359'),
]

operations = [
migrations.AddField(
model_name='enterprisecustomerssoconfiguration',
name='marked_authorized',
field=models.BooleanField(blank=True, default=False, help_text='Whether admin has indicated the service provider metadata was uploaded.', null=True),
),
migrations.AddField(
model_name='historicalenterprisecustomerssoconfiguration',
name='marked_authorized',
field=models.BooleanField(blank=True, default=False, help_text='Whether admin has indicated the service provider metadata was uploaded.', null=True),
),
]
29 changes: 29 additions & 0 deletions enterprise/migrations/0196_backfill_sso_marked_authorized.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Generated by Django 3.2.23 on 2023-11-30 19:01

from django.db import migrations, models


def backfill_sso_marked_authorized(apps, app_schema):
"""
Sets all Enterprise Customer SSO Configuration records 'marked_authorized' to False, in anticipation
of making it the default value
"""
EnterpriseCustomerSsoConfiguration = apps.get_model('enterprise', 'EnterpriseCustomerSsoConfiguration')
queryset = EnterpriseCustomerSsoConfiguration.all_objects.all()
for sso_config in queryset:
sso_config.marked_authorized = False
EnterpriseCustomerSsoConfiguration.all_objects.bulk_update(queryset, ['marked_authorized'])


class Migration(migrations.Migration):

dependencies = [
('enterprise', '0195_auto_20231130_1837'),
]

operations = [
migrations.RunPython(
code=backfill_sso_marked_authorized,
reverse_code=migrations.RunPython.noop,
),
]
23 changes: 23 additions & 0 deletions enterprise/migrations/0197_auto_20231130_2239.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Generated by Django 3.2.23 on 2023-11-30 22:39

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('enterprise', '0196_backfill_sso_marked_authorized'),
]

operations = [
migrations.AlterField(
model_name='enterprisecustomerssoconfiguration',
name='marked_authorized',
field=models.BooleanField(default=False, help_text='Whether admin has indicated the service provider metadata was uploaded.'),
),
migrations.AlterField(
model_name='historicalenterprisecustomerssoconfiguration',
name='marked_authorized',
field=models.BooleanField(default=False, help_text='Whether admin has indicated the service provider metadata was uploaded.'),
),
]
9 changes: 9 additions & 0 deletions enterprise/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -3955,6 +3955,15 @@ class Meta:
)
)

marked_authorized = models.BooleanField(
blank=False,
null=False,
default=False,
help_text=_(
"Whether admin has indicated the service provider metadata was uploaded."
)
)

# ---------------------------- SAP Success Factors attribute mappings ---------------------------- #

odata_api_timeout_interval = models.PositiveIntegerField(
Expand Down

0 comments on commit 97c9128

Please sign in to comment.