Sync GovOPlaN module state
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from govoplan_core.core.access import CAPABILITY_AUTH_PERMISSION_EVALUATOR, CAPABILITY_AUTH_PRINCIPAL_RESOLVER
|
||||
from govoplan_core.core.policy import CAPABILITY_POLICY_PRIVACY_RETENTION
|
||||
from govoplan_core.core.modules import ModuleContext, ModuleManifest
|
||||
|
||||
|
||||
@@ -11,12 +12,22 @@ def _route_factory(context: ModuleContext):
|
||||
return router
|
||||
|
||||
|
||||
def _privacy_retention_service(context: ModuleContext) -> object:
|
||||
del context
|
||||
from govoplan_policy.backend.retention import SqlPrivacyRetentionService
|
||||
|
||||
return SqlPrivacyRetentionService()
|
||||
|
||||
|
||||
manifest = ModuleManifest(
|
||||
id="policy",
|
||||
name="Policy",
|
||||
version="0.1.6",
|
||||
required_capabilities=(CAPABILITY_AUTH_PRINCIPAL_RESOLVER, CAPABILITY_AUTH_PERMISSION_EVALUATOR),
|
||||
route_factory=_route_factory,
|
||||
capability_factories={
|
||||
CAPABILITY_POLICY_PRIVACY_RETENTION: _privacy_retention_service,
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user