Coverage for src/lexigram/admin/settings/panel/rbac_spec.py: 100%
14 statements
« prev ^ index » next coverage.py v7.15.4, created at 2026-08-21 14:56 +0800
« prev ^ index » next coverage.py v7.15.4, created at 2026-08-21 14:56 +0800
1"""RBAC configuration specification."""
3from __future__ import annotations
5from lexigram.admin.settings.panel.models import RbacSettings
6from lexigram.admin.settings.panel.nodes import PydanticConfigSpec
7from lexigram.admin.settings.panel.registry import ConfigRegistry
9__all__ = ["RBACSpec", "register_spec"]
12class RBACSpec(PydanticConfigSpec):
13 """RBAC configuration spec."""
15 namespace = "admin.rbac"
16 label = "Access Control (RBAC)"
17 icon = "shield-check"
18 description = "Default role and anonymous access policy."
19 model = RbacSettings
20 required_permissions = frozenset({"admin.settings.edit"})
23def register_spec(registry: ConfigRegistry) -> None:
24 """Register this spec with the config registry."""
25 registry.register_spec(RBACSpec)