Initialize GovOPlaN module seed
This commit is contained in:
1
src/govoplan_issue_reporting/__init__.py
Normal file
1
src/govoplan_issue_reporting/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
"""GovOPlaN Issue Reporting module."""
|
||||
1
src/govoplan_issue_reporting/backend/__init__.py
Normal file
1
src/govoplan_issue_reporting/backend/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
"""Backend integration for the GovOPlaN Issue Reporting module."""
|
||||
103
src/govoplan_issue_reporting/backend/manifest.py
Normal file
103
src/govoplan_issue_reporting/backend/manifest.py
Normal file
@@ -0,0 +1,103 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from govoplan_core.core.access import CAPABILITY_AUTH_PERMISSION_EVALUATOR, CAPABILITY_AUTH_PRINCIPAL_RESOLVER
|
||||
from govoplan_core.core.modules import DocumentationLink, DocumentationTopic, ModuleManifest, PermissionDefinition, RoleTemplate
|
||||
|
||||
MODULE_ID = "issue-reporting"
|
||||
MODULE_NAME = "Issue Reporting"
|
||||
MODULE_VERSION = "0.1.6"
|
||||
READ_SCOPE = "issue-reporting:workspace:read"
|
||||
WRITE_SCOPE = "issue-reporting:workspace:write"
|
||||
ADMIN_SCOPE = "issue-reporting:workspace:admin"
|
||||
OPTIONAL_DEPENDENCIES = (
|
||||
"helpdesk",
|
||||
"cases",
|
||||
"assets",
|
||||
"facilities",
|
||||
"forms-runtime",
|
||||
"portal",
|
||||
"files",
|
||||
"workflow",
|
||||
)
|
||||
|
||||
|
||||
def _permission(scope: str, label: str, description: str) -> PermissionDefinition:
|
||||
module_id, resource, action = scope.split(":", 2)
|
||||
return PermissionDefinition(
|
||||
scope=scope,
|
||||
label=label,
|
||||
description=description,
|
||||
category="Issue Reporting",
|
||||
level="tenant",
|
||||
module_id=module_id,
|
||||
resource=resource,
|
||||
action=action,
|
||||
)
|
||||
|
||||
|
||||
PERMISSIONS = (
|
||||
_permission(READ_SCOPE, "View issue reporting workspace", "Read issue reporting records, configuration, and workflow context."),
|
||||
_permission(WRITE_SCOPE, "Manage issue reporting workspace", "Create and update issue reporting records and workflow state."),
|
||||
_permission(ADMIN_SCOPE, "Administer issue reporting workspace", "Configure issue reporting policies, templates, and tenant-level administration."),
|
||||
)
|
||||
|
||||
ROLE_TEMPLATES = (
|
||||
RoleTemplate(
|
||||
slug="issue_reporting_manager",
|
||||
name="Issue Reporting manager",
|
||||
description="Manage issue reporting records and workflow state.",
|
||||
permissions=(READ_SCOPE, WRITE_SCOPE),
|
||||
),
|
||||
RoleTemplate(
|
||||
slug="issue_reporting_viewer",
|
||||
name="Issue Reporting viewer",
|
||||
description="Read issue reporting records and workflow context.",
|
||||
permissions=(READ_SCOPE,),
|
||||
),
|
||||
)
|
||||
|
||||
DOCUMENTATION = (
|
||||
DocumentationTopic(
|
||||
id=f"{MODULE_ID}.module-boundary",
|
||||
title=f"{MODULE_NAME} module boundary",
|
||||
summary="Public or internal problem reporting for broken infrastructure, damaged rooms, IT outages, safety issues, accessibility issues, triage, and routing.",
|
||||
body=(
|
||||
"This repository is currently a platform module seed. It registers the domain boundary, "
|
||||
"permission surface, role templates, and documentation metadata before runtime APIs, "
|
||||
"database models, migrations, and WebUI routes are introduced."
|
||||
),
|
||||
layer="available",
|
||||
documentation_types=("admin",),
|
||||
audience=("operator", "module_admin", "product_owner"),
|
||||
order=100,
|
||||
related_modules=OPTIONAL_DEPENDENCIES,
|
||||
links=(
|
||||
DocumentationLink(
|
||||
label="Repository domain boundary",
|
||||
href="govoplan-issue-reporting/docs/ISSUE_REPORTING_DOMAIN_BOUNDARY.md",
|
||||
kind="repository",
|
||||
),
|
||||
),
|
||||
metadata={
|
||||
"seed": True,
|
||||
"domain_objects": ['issue intake', 'problem category taxonomy', 'triage and routing facts', 'public reporter references', 'handoff targets'],
|
||||
"first_slice": "Define intake submission, triage status, category, location, evidence, and handoff contracts to helpdesk, cases, assets, or facilities.",
|
||||
},
|
||||
),
|
||||
)
|
||||
|
||||
manifest = ModuleManifest(
|
||||
id=MODULE_ID,
|
||||
name=MODULE_NAME,
|
||||
version=MODULE_VERSION,
|
||||
dependencies=("access",),
|
||||
optional_dependencies=OPTIONAL_DEPENDENCIES,
|
||||
required_capabilities=(CAPABILITY_AUTH_PRINCIPAL_RESOLVER, CAPABILITY_AUTH_PERMISSION_EVALUATOR),
|
||||
permissions=PERMISSIONS,
|
||||
role_templates=ROLE_TEMPLATES,
|
||||
documentation=DOCUMENTATION,
|
||||
)
|
||||
|
||||
|
||||
def get_manifest() -> ModuleManifest:
|
||||
return manifest
|
||||
0
src/govoplan_issue_reporting/py.typed
Normal file
0
src/govoplan_issue_reporting/py.typed
Normal file
Reference in New Issue
Block a user