Files
SGF/docs/integration/sgf-8085-access-proposal.json
2026-11-11 09:00:17 +02:00

762 lines
18 KiB
JSON

{
"version": "SGF-8085-SYNTHETIC-ACCESS-PROPOSAL-v1",
"approved": true,
"applied": true,
"installation": "cc50a276c10c",
"port": 8085,
"scope": {
"tenant_id": 1,
"company_id": 2,
"unit_id": 2
},
"new_database_roles": false,
"real_accounts": false,
"credentials_in_repository": false,
"source_policy": "Existing right names must be checked against the installed CHECK before any grant; fail on unknown names rather than broaden privileges.",
"profiles": [
{
"id": "commercial_prepare",
"label": "QA Comercial — preparação",
"rights": [
{
"permission": "company.view",
"scope": "company"
},
{
"permission": "unit.view",
"scope": "unit"
},
{
"permission": "clients.view",
"scope": "company"
},
{
"permission": "services.view",
"scope": "company"
},
{
"permission": "service_drafts.view",
"scope": "unit"
},
{
"permission": "billing_drafts.view",
"scope": "unit"
},
{
"permission": "service_invoices.view",
"scope": "unit"
},
{
"permission": "clients.create",
"scope": "company"
},
{
"permission": "clients.edit",
"scope": "company"
},
{
"permission": "services.create",
"scope": "company"
},
{
"permission": "services.edit",
"scope": "company"
},
{
"permission": "service_drafts.create",
"scope": "unit"
},
{
"permission": "service_drafts.edit",
"scope": "unit"
},
{
"permission": "billing_drafts.create",
"scope": "unit"
},
{
"permission": "billing_drafts.edit",
"scope": "unit"
},
{
"permission": "billing_drafts.confirm_internal",
"scope": "unit"
},
{
"permission": "issuer_documents.view",
"scope": "company"
},
{
"permission": "issuer_documents.edit",
"scope": "company"
},
{
"permission": "client_documents.view",
"scope": "company"
},
{
"permission": "client_documents.edit",
"scope": "company"
},
{
"permission": "draft_documents.view",
"scope": "unit"
},
{
"permission": "draft_documents.edit",
"scope": "unit"
},
{
"permission": "service_fiscal.view",
"scope": "company"
},
{
"permission": "service_fiscal.propose",
"scope": "company"
},
{
"permission": "service_fiscal.calculate",
"scope": "unit"
},
{
"permission": "invoice_series.view",
"scope": "company"
},
{
"permission": "invoice_series.propose",
"scope": "company"
},
{
"permission": "service_invoices.issue",
"scope": "unit"
},
{
"permission": "service_invoices.correction_request",
"scope": "unit"
},
{
"permission": "document_preview.configure",
"scope": "company"
}
]
},
{
"id": "commercial_review",
"label": "QA Comercial — revisão",
"rights": [
{
"permission": "company.view",
"scope": "company"
},
{
"permission": "unit.view",
"scope": "unit"
},
{
"permission": "clients.view",
"scope": "company"
},
{
"permission": "services.view",
"scope": "company"
},
{
"permission": "service_drafts.view",
"scope": "unit"
},
{
"permission": "billing_drafts.view",
"scope": "unit"
},
{
"permission": "service_invoices.view",
"scope": "unit"
},
{
"permission": "service_fiscal.view",
"scope": "company"
},
{
"permission": "service_fiscal.approve",
"scope": "company"
},
{
"permission": "invoice_series.view",
"scope": "company"
},
{
"permission": "invoice_series.approve",
"scope": "company"
},
{
"permission": "issuer_documents.view",
"scope": "company"
},
{
"permission": "client_documents.view",
"scope": "company"
},
{
"permission": "draft_documents.view",
"scope": "unit"
}
]
},
{
"id": "workshop_manage",
"label": "QA Oficinas — gestão",
"rights": [
{
"permission": "company.view",
"scope": "company"
},
{
"permission": "unit.view",
"scope": "unit"
},
{
"permission": "clients.view",
"scope": "company"
},
{
"permission": "workshop.view",
"scope": "unit"
},
{
"permission": "workshop.open",
"scope": "unit"
},
{
"permission": "workshop.assign",
"scope": "unit"
},
{
"permission": "workshop.authorize",
"scope": "unit"
}
]
},
{
"id": "workshop_record",
"label": "QA Oficinas — técnico",
"rights": [
{
"permission": "company.view",
"scope": "company"
},
{
"permission": "unit.view",
"scope": "unit"
},
{
"permission": "workshop.view",
"scope": "unit"
},
{
"permission": "workshop.record",
"scope": "unit"
},
{
"permission": "stock.view",
"scope": "unit"
},
{
"permission": "workshop_stock.view",
"scope": "unit"
},
{
"permission": "workshop_stock.prepare",
"scope": "unit"
}
]
},
{
"id": "workshop_verify",
"label": "QA Oficinas — conferência",
"rights": [
{
"permission": "company.view",
"scope": "company"
},
{
"permission": "unit.view",
"scope": "unit"
},
{
"permission": "workshop.view",
"scope": "unit"
},
{
"permission": "workshop.verify",
"scope": "unit"
},
{
"permission": "stock.view",
"scope": "unit"
},
{
"permission": "workshop_stock.view",
"scope": "unit"
}
]
},
{
"id": "finance_prepare",
"label": "QA Financeiro — preparação",
"rights": [
{
"permission": "company.view",
"scope": "company"
},
{
"permission": "unit.view",
"scope": "unit"
},
{
"permission": "service_receivables.view",
"scope": "unit"
},
{
"permission": "service_receivables.prepare",
"scope": "unit"
},
{
"permission": "service_receivables.allocate",
"scope": "unit"
},
{
"permission": "service_receivables.correction_request",
"scope": "unit"
},
{
"permission": "direct_costs.view",
"scope": "unit"
},
{
"permission": "industrial_costs.view",
"scope": "unit"
},
{
"permission": "industrial_costs.prepare",
"scope": "unit"
},
{
"permission": "industrial_budgets.view",
"scope": "unit"
},
{
"permission": "industrial_budgets.prepare",
"scope": "unit"
},
{
"permission": "workshop_billing.view",
"scope": "unit"
},
{
"permission": "workshop_billing.prepare",
"scope": "unit"
},
{
"permission": "workshop_billing.generate",
"scope": "unit"
},
{
"permission": "workshop.view",
"scope": "unit"
},
{
"permission": "direct_costs.prepare",
"scope": "unit"
},
{
"permission": "industrial_budget_comparisons.view",
"scope": "unit"
},
{
"permission": "industrial_budget_comparisons.prepare",
"scope": "unit"
},
{
"permission": "clients.view",
"scope": "company"
},
{
"permission": "services.view",
"scope": "company"
},
{
"permission": "service_drafts.view",
"scope": "unit"
},
{
"permission": "service_drafts.create",
"scope": "unit"
},
{
"permission": "billing_drafts.view",
"scope": "unit"
},
{
"permission": "billing_drafts.create",
"scope": "unit"
},
{
"permission": "workshop_corrections.view",
"scope": "unit"
},
{
"permission": "workshop_corrections.request",
"scope": "unit"
},
{
"permission": "workshop_corrections.apply",
"scope": "unit"
}
]
},
{
"id": "finance_review",
"label": "QA Financeiro — revisão",
"rights": [
{
"permission": "company.view",
"scope": "company"
},
{
"permission": "unit.view",
"scope": "unit"
},
{
"permission": "service_receivables.view",
"scope": "unit"
},
{
"permission": "service_receivables.confirm",
"scope": "unit"
},
{
"permission": "service_receivables.reconcile",
"scope": "unit"
},
{
"permission": "service_receivables.correction_approve",
"scope": "unit"
},
{
"permission": "direct_costs.view",
"scope": "unit"
},
{
"permission": "direct_costs.validate",
"scope": "unit"
},
{
"permission": "industrial_costs.view",
"scope": "unit"
},
{
"permission": "industrial_budgets.view",
"scope": "unit"
},
{
"permission": "workshop_billing.view",
"scope": "unit"
},
{
"permission": "workshop_billing.review",
"scope": "unit"
},
{
"permission": "workshop.view",
"scope": "unit"
},
{
"permission": "industrial_costs.validate",
"scope": "unit"
},
{
"permission": "industrial_budgets.validate",
"scope": "unit"
},
{
"permission": "industrial_budget_comparisons.view",
"scope": "unit"
},
{
"permission": "clients.view",
"scope": "company"
},
{
"permission": "services.view",
"scope": "company"
},
{
"permission": "workshop_corrections.view",
"scope": "unit"
},
{
"permission": "workshop_corrections.review",
"scope": "unit"
}
]
},
{
"id": "accounting_prepare",
"label": "QA Contabilidade — preparação",
"rights": [
{
"permission": "company.view",
"scope": "company"
},
{
"permission": "unit.view",
"scope": "unit"
},
{
"permission": "catalogue_accounting.view",
"scope": "company"
},
{
"permission": "catalogue_accounting.propose",
"scope": "company"
},
{
"permission": "general_ledger.view",
"scope": "unit"
},
{
"permission": "general_ledger.prepare",
"scope": "unit"
},
{
"permission": "general_ledger.post",
"scope": "unit"
},
{
"permission": "general_ledger.correct_prepare",
"scope": "unit"
},
{
"permission": "general_ledger.correct_post",
"scope": "unit"
},
{
"permission": "general_ledger.period_prepare",
"scope": "unit"
},
{
"permission": "general_ledger.period_close",
"scope": "unit"
},
{
"permission": "purchasing_obligations.view",
"scope": "unit"
},
{
"permission": "purchasing_invoices.view",
"scope": "unit"
}
]
},
{
"id": "accounting_review",
"label": "QA Contabilidade — revisão",
"rights": [
{
"permission": "company.view",
"scope": "company"
},
{
"permission": "unit.view",
"scope": "unit"
},
{
"permission": "catalogue_accounting.view",
"scope": "company"
},
{
"permission": "catalogue_accounting.approve",
"scope": "company"
},
{
"permission": "general_ledger.view",
"scope": "unit"
},
{
"permission": "general_ledger.validate",
"scope": "unit"
},
{
"permission": "general_ledger.correct_validate",
"scope": "unit"
},
{
"permission": "general_ledger.period_validate",
"scope": "unit"
},
{
"permission": "purchasing_obligations.view",
"scope": "unit"
},
{
"permission": "purchasing_invoices.view",
"scope": "unit"
}
]
},
{
"id": "read_only",
"label": "QA Consulta — seis módulos",
"rights": [
{
"permission": "company.view",
"scope": "company"
},
{
"permission": "unit.view",
"scope": "unit"
},
{
"permission": "clients.view",
"scope": "company"
},
{
"permission": "services.view",
"scope": "company"
},
{
"permission": "service_drafts.view",
"scope": "unit"
},
{
"permission": "billing_drafts.view",
"scope": "unit"
},
{
"permission": "service_invoices.view",
"scope": "unit"
},
{
"permission": "workshop.view",
"scope": "unit"
},
{
"permission": "direct_costs.view",
"scope": "unit"
},
{
"permission": "industrial_costs.view",
"scope": "unit"
},
{
"permission": "service_receivables.view",
"scope": "unit"
},
{
"permission": "catalogue_accounting.view",
"scope": "company"
},
{
"permission": "general_ledger.view",
"scope": "unit"
},
{
"permission": "stock.view",
"scope": "unit"
}
]
}
],
"existing_stock_profile": {
"role": "validator",
"user_id": 2,
"rights": [
"stock.operations.prepare",
"stock.operations.confirm",
"workshop.view",
"workshop_stock.view",
"workshop_stock.confirm"
],
"warehouse_policy": "existing main warehouse and one new empty explicitly mapped synthetic warehouse; no foreign warehouse"
},
"new_right_names": [
"stock.operations.prepare",
"stock.operations.confirm"
],
"forbidden": [
"access.manage",
"automatic legacy module association",
"changes to six protected records",
"cache clearing",
"real money or fiscal documents",
"period reopening",
"publication",
"new demo/server/database",
"SGC connector activation"
],
"financial_source_policy": {
"payables": "retain authoritative native obligation, no copy of debt",
"ledger": "one common ledger in existing native book with explicit SGF company/unit scope",
"native_finance_bindings": {
"finance_prepare": 4,
"finance_review": 7,
"accounting_prepare": 4,
"accounting_review": 7,
"read_only": 8
},
"real_permissions": false,
"sgc_server_required": false
},
"authorization": {
"date": "2026-11-10",
"decision": "autorizo",
"scope": "docs/SGF_8085_NEXT_AUTHORIZATION.md"
},
"integration_grants": {
"finance_prepare": {
"unit": [
"supplier_payables.view",
"service_invoices.view"
]
},
"finance_review": {
"unit": [
"supplier_payables.view",
"service_invoices.view"
]
},
"read_only": {
"unit": [
"supplier_payables.view"
]
},
"accounting_prepare": {
"unit": [
"service_invoices.view",
"service_receivables.view",
"workshop.view",
"direct_costs.view",
"industrial_costs.view"
],
"company": [
"clients.view",
"services.view"
]
},
"accounting_review": {
"unit": [
"service_invoices.view",
"service_receivables.view",
"workshop.view",
"direct_costs.view",
"industrial_costs.view"
],
"company": [
"clients.view",
"services.view"
]
}
},
"integration_grants_reason": "Minimum existing read rights needed for the approved cross-module origin conferences; no new permission names or business-write authority."
}