12 lines
471 B
Python
12 lines
471 B
Python
"""Import existing account roles into the unified role/member tables."""
|
|
import json
|
|
from django.core.management.base import BaseCommand
|
|
from system_manage.platform_access import reconcile_builtin_roles
|
|
|
|
|
|
class Command(BaseCommand):
|
|
help = 'Backfill built-in platform roles; preserves custom roles and resource grants. No schema migration.'
|
|
|
|
def handle(self, *args, **options):
|
|
self.stdout.write(json.dumps(reconcile_builtin_roles(), ensure_ascii=False))
|