4 — Consulta do Processo (CONSULTATION_PORTAL)
Disponibilizar ao arguido e, quando aplicável, ao seu mandatário, o acesso controlado às peças do processo para exercício do direito de defesa.
Source: src/components/workflow/ConsultaProcessoPhaseView.tsx,
ConsultaProcessoAccessDrawer.tsx.
The only phase with no formal deliverable — the act being recorded is granting access, not
producing a document. It is also the phase DEFAULT_CHECKLISTS forgets entirely, so the engine
checklist is empty here and the UI shows "Sem checklist para a fase Consulta do Processo".
Acesso ao Portal — 4 rows, one drawer
The four rows in the UI are views over a single access-config form
(ConsultaAccessConfig, stored in the deliverable metadata):
| Row | Inputs | Control | Config key |
|---|---|---|---|
| Destinatário principal | Nome · Email | text · email | arguido_name · arguido_email |
| Mandatário / Representante legal | Tem mandatário (switch) → Nome do mandatário · Email do mandatário · Acesso concedido a | switch → text · email · select | has_mandatario · mandatario_name · mandatario_email · access_granted_to |
| Método de autenticação | Magic link / OTP (código) | select | auth_method |
| Expiração do acesso | Data de expiração do acesso | date | expiry_date |
Acesso concedido a options: Apenas arguido · Apenas mandatário · Ambos. When
has_mandatario is off it is forced back to arguido on save.
Nome and Email default from cases.employee_name / employee_email.
The Mandatário row reports filled: true unconditionally — "Sem mandatário" counts as
answered, which is correct as a question ("is there one?") but means the counter cannot tell an
answered no from an untouched field.
Peças disponibilizadas no portal
No inputs in this phase. The block only reports how many portal_items exist and, per item,
whether it is view-only or downloadable. The UI points elsewhere: "Gerir peças no separador
'Portal' deste processo." Each item there carries a type, an optional title_override and an
allow_download flag.
So the phase whose entire legal purpose is controlling what the arguido may see delegates the choice of what he sees to another tab, and its own gate does not check it.
Ativar portal
One action. It inserts into process_portal_links:
| Written | From |
|---|---|
invited_name · invited_email | config, falling back to the case's employee |
invited_role | "EMPLOYEE" |
expires_at | expiry_date, defaulting to now + 30 days |
allow_submission | true, always |
otp_required | auth_method === "otp" |
A second link is created for the mandatário when has_mandatario and
access_granted_to is mandatario or ambos.
The 30-day fallback is an invented number with no legal citation — see naive deadline math.
Prazo e estado do acesso — read-only
Data de ativação · Prazo final de consulta · Primeiro acesso · Último acesso · Estado do portal (Por ativar · Ativo · Expirado · Respondido).
Related
- Portal flow — how the token side works
- Portal has no rate limiting
- Access password stored in plaintext