Law Office Reference Public

Administration & Controls

Administering the Law Office module: the permission model, restricted matters and access logging, module settings, the reminder cron job, the demo seeder, and both API surfaces.

Guide version: r1 Module version: 1.0.0 Updated: 2026-08-20 Estimated time: 3 min 8 views 0% helpful
Governance

Administration & Controls

Access control, confidentiality enforcement, settings, automation, sample data, and the module's two API surfaces — everything a firm administrator owns.

The permission model (25 keys)

AreaKeysNotes
Modulelaw_officeBase access; gates the menu group and the Command Center.
Partieslaw_office_parties + _create/_update/_deleteThe registry and its aliases/relationships.
Intakeslaw_office_intakes + CRUD, law_office_intakes_decideDecide = accept/decline authority.
Conflictslaw_office_conflicts, law_office_conflicts_decideRun searches vs record dispositions. Holding either also makes the user a confidential-intake reviewer.
Matterslaw_office_matters + CRUD, law_office_matters_restrict, law_office_restricted_viewRestrict = may flag/unflag and edit teams; restricted-view = firm-wide bypass (partners/compliance only).
Docketlaw_office_docket, law_office_docket_manage, law_office_deadlines_verifyVerify is the lawyer-only trust gate.
Work productlaw_office_tasks_manage, law_office_documents_manageMatter tab actions.
Reports / Settingslaw_office_reports, law_office_settingsReports remain visibility-scoped even for report users.
????
The key set is frozen. Permission keys are serialized into role/user grants, so they never get renamed; the module's test suite pins the exact 25-key set.

Confidentiality enforcement (how it actually works)

  • Restricted matters — one SQL visibility rule (open, OR creator, OR lead, OR on the team roster, OR restricted-view holder) is applied inside the database query for every cross-matter read: listings, the firm calendar, the deadline register, reports, dashboard, widgets, and the end-user API. There is no code path that lists matters without it.
  • Confidential intakes — visible only to creator, intended lead, and conflict reviewers.
  • Access logging — every permitted view of a restricted matter or confidential intake writes an insert-only row (who, what, when) to the module's access log; exports from reports are logged the same way.
  • Audit trail — every mutation (create/update/status/verify/team/restrict/document) writes a system log entry, and matter/intake timelines record the business events.

Module settings (Law Office → Settings)

TabWhat it manages
Module SettingsReference formats (MAT-{YYYY}-{####}, INT-{YYYY}-{####}) and the reminder ladder (10,5,3,1,0 days before due).
Practice AreasThe firm's area catalog; deleting is blocked while matters use an area.
Matter TypesPer-area types; the litigation flag drives court/docket fields on the matter form.

Automation (Advanced Cron)

JobScheduleWhat it does
law_office_deadline_sweepDaily 05:30Reminds assignees at each ladder rung (exactly once per rung), flags overdue verified deadlines, nags about drafts unverified 3+ days. Writes its markers before notifying; runs per tenant; self-gates on the module toggle.
php erpat cron:dry-run law_office_deadline_sweep   # preview
php erpat cron:run law_office_deadline_sweep       # manual run

Demo / sample data

php erpat db:seed LawOfficeDemo [--tenant=<company_key>|--all|--dry-run]
php erpat db:seed LawOfficeDemo --remove   # reversible (soft delete)

Also available from the Bulk Database Seeder modal. Demo rows are identified by their *-DEMO-* references; removal soft-deletes exactly those rows, children before parents.

API surfaces

SurfaceEndpointsAccess rules
Integration API
/api/v1/law-office/*
matters, matters/{id}, parties, deadlines (all GET)OAuth client credentials + scope law_office:read (grant per client under Settings → API Access). Restricted matters are never exposed, and intakes/conflict data have no machine surface at all.
End-User API
/v1/api/me/law-office/*
tasks, deadlines, matters (all GET)Employee JWT; strictly self-scoped; the same team-visibility rules as the web UI, with no bypass.

OpenAPI specs regenerate with php erpat api:openapi / php erpat euapi:openapi.

Multi-tenancy notes

  • All law_* tables are per-tenant; migrations and the sweep run per tenant automatically.
  • Document files store under the tenant-aware storage pipeline (local files/general/law_office/… or S3 with tenant-slug prefixes).
  • Seed a single tenant with --tenant=<company_key>, or everything with --all.
Was this guide helpful?

Report a content problem