RBAC + Per-Route Audit Events

This commit is contained in:
2026-01-20 10:08:32 +00:00
parent 47b90fee87
commit 6901f6fcc4
18 changed files with 381 additions and 122 deletions

20
app/apps/core/apps.py Normal file
View File

@@ -0,0 +1,20 @@
from __future__ import annotations
from django.apps import AppConfig
from django.db.models.signals import post_migrate
class CoreConfig(AppConfig):
default_auto_field = "django.db.models.BigAutoField"
name = "apps.core"
label = "core"
verbose_name = "Core"
def ready(self) -> None:
from .rbac import ensure_role_groups
def _ensure_roles(**_kwargs) -> None:
ensure_role_groups()
post_migrate.connect(_ensure_roles, sender=self)
return super().ready()