diff --git a/CHANGELOG.md b/CHANGELOG.md index 84c702c..353aa29 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to ### Added +- ✨(organization) add `is_active` field - ✨(domains) notify support when domain status changes #668 - ✨(domains) define domain check interval as a settings - ✨(oidc) add simple introspection backend #832 diff --git a/src/backend/core/admin.py b/src/backend/core/admin.py index 5afc2e3..b565984 100644 --- a/src/backend/core/admin.py +++ b/src/backend/core/admin.py @@ -241,9 +241,11 @@ class OrganizationAdmin(admin.ModelAdmin): actions = [run_post_creation_plugins] list_display = ( "name", + "is_active", "created_at", "updated_at", ) + list_filter = ("is_active",) search_fields = ("name",) inlines = (OrganizationAccessInline, OrganizationServiceProviderInline) exclude = ("service_providers",) # Handled by the inline diff --git a/src/backend/core/migrations/0013_organization_is_active.py b/src/backend/core/migrations/0013_organization_is_active.py new file mode 100644 index 0000000..10d5152 --- /dev/null +++ b/src/backend/core/migrations/0013_organization_is_active.py @@ -0,0 +1,18 @@ +# Generated by Django 5.1.7 on 2025-03-27 10:03 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('core', '0012_organization_metadata'), + ] + + operations = [ + migrations.AddField( + model_name='organization', + name='is_active', + field=models.BooleanField(default=True, verbose_name='active'), + ), + ] diff --git a/src/backend/core/models.py b/src/backend/core/models.py index b093da4..f8dcebe 100644 --- a/src/backend/core/models.py +++ b/src/backend/core/models.py @@ -393,6 +393,7 @@ class Organization(BaseModel): related_name="organizations", blank=True, ) + is_active = models.BooleanField(verbose_name=_("active"), default=True) objects = OrganizationManager()