28 lines
696 B
Python
28 lines
696 B
Python
from __future__ import annotations
|
|
|
|
from govoplan_core.core.module_entitlements import (
|
|
TenantModuleAdmission,
|
|
TenantWorkState,
|
|
)
|
|
|
|
|
|
def allowed_worker_admissions(
|
|
_registry,
|
|
_session,
|
|
*,
|
|
capability_name: str,
|
|
tenant_id: str | None,
|
|
work_state: TenantWorkState = "accepted",
|
|
) -> tuple[TenantModuleAdmission, ...]:
|
|
return (
|
|
TenantModuleAdmission(
|
|
tenant_id=tenant_id or "tenant-1",
|
|
module_id=capability_name.split(".", 1)[0],
|
|
revision=1,
|
|
work_state=work_state,
|
|
allowed=True,
|
|
disposition="allowed",
|
|
reason="Test tenant permits the worker capability.",
|
|
),
|
|
)
|