✨(organization) add is_active field
Add flag to indicate whether the organization is active. Prepare organizations provisioning. The organization will be created with this flag set to False and will become active when the first user is associated with it.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
18
src/backend/core/migrations/0013_organization_is_active.py
Normal file
18
src/backend/core/migrations/0013_organization_is_active.py
Normal file
@@ -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'),
|
||||
),
|
||||
]
|
||||
@@ -393,6 +393,7 @@ class Organization(BaseModel):
|
||||
related_name="organizations",
|
||||
blank=True,
|
||||
)
|
||||
is_active = models.BooleanField(verbose_name=_("active"), default=True)
|
||||
|
||||
objects = OrganizationManager()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user