Compliance Reference Public

Administration & Controls

Administer the ERPat Compliance suite: the per-area permission matrix, the disciplinary settings tab, the auto-close cron job, the routes overview, the two REST API surfaces, the append-only audit log, and demo-data management.

Guide version: r1 Module version: 1.2.0 Updated: 2026-07-22 Estimated time: 4 min 1 views
User Manual / Administration & Controls

Administration & Controls

The administrator surface for the whole suite: enablement, the per-area permission matrix, the disciplinary settings tab, the scheduled auto-close job, the routes overview, the two REST APIs, the append-only audit log, and how to manage demo data.

Enablement

The suite is gated by the module_compliance setting (Settings → Manage Modules). When disabled, the whole Compliance menu group, all twelve area screens, the settings tab, the permissions, and the routes are withdrawn, and the cron job self-skips. On upgrade the setting is seeded from the legacy module_disciplinary value. The module slug is compliance, category Human Resource, version 1.2.0.

Permission matrix

Grant access in Settings → Roles. Every area is gated independently, so a role only sees the areas you switch on. Most areas offer a base toggle plus Create / Update / Delete; Overview and Audit Log are view-only, and Configuration is an administrator area.

AreaRouteBase permissionActions
Overviewcompliance/dashboardcompliance_overviewView only
Disciplinaryhrs/compliancedeciplinaryCreate / Update / Delete
Investigationscompliance/investigationscompliance_investigationCreate / Update / Delete
Corrective Actionscompliance/corrective_actionscompliance_corrective_actionCreate / Update / Delete
Disclosurescompliance/disclosurescompliance_disclosureCreate / Update / Delete
Speak-up & Grievancescompliance/reportscompliance_reportCreate / Update / Delete (restricted)
Training & Certificationscompliance/trainingcompliance_trainingCreate / Update / Delete
Policies & Attestationscompliance/policiescompliance_policyCreate / Update / Delete
Compliance Calendarcompliance/calendarcompliance_calendarCreate / Update / Delete
Reports & Analyticscompliance/analyticscompliance_analyticsCreate / Update / Delete
Audit Logcompliance/auditcompliance_auditView only
Configurationcompliance/configcompliance_configCreate / Update / Delete (admin)

The Disciplinary area carries additional keys that predate the module and were preserved to keep existing grants resolving:

  • deciplinary (+ _create / _update / _delete) — base case access.
  • deciplinary_category (+ _create / _update / _delete) — category catalog.
  • manage_disciplinary — edit cases and change statuses.
  • disciplinary_manage_labels, add_disciplinary_label — case labels.
  • corrective_select_compliance_officers — choose assessors instead of the category default.
  • disciplinary_can_do_comment, disciplinary_can_use_prefab_comments — commenting and canned comments.

Disciplinary settings tab

Administrators configure disciplinary behavior under Settings → Disciplinary (route compliance/settings):

  • Disable “new” status — new cases start as Open instead of New.
  • Prefab comment options — the canned comments users can pick from.
  • Acknowledge prefab — the phrase that marks an acknowledgement.
  • Prefab comment limit — how many acknowledgement prefabs a user may leave.
  • Auto-close after (days) — the window the scheduled job uses.

Scheduled automation

The auto_close_disciplinary_logs cron job closes aged New/Open disciplinary cases whose corrective period has elapsed beyond the configured window, logging and notifying each closure. It runs per-tenant and self-skips where the module is disabled. It is the suite's only scheduled job; the other areas act on operator input rather than a timer.

Routes overview

Each area has its own canonical route. Disciplinary keeps legacy aliases so old bookmarks, integrations, and notification links keep working.

Area screens

  • compliance/dashboard — Overview
  • hrs/compliance · legacy hrs/disciplinary
  • hrs/compliance_categories · legacy hrs/discipline_categories
  • compliance/investigations
  • compliance/corrective_actions
  • compliance/disclosures
  • compliance/reports

Area screens (continued)

  • compliance/training
  • compliance/policies
  • compliance/calendar
  • compliance/analytics
  • compliance/audit
  • compliance/config
  • compliance/settings — disciplinary settings tab

REST APIs

Integration API

GET /api/v1/disciplinary/user/{user_id} and GET /api/v1/disciplinary/{id} (scope users:read). Served by Compliance_api; returns disciplinary records for a subject or a single case.

Employee self-service API

GET /v1/api/me/disciplinary and GET /v1/api/me/disciplinary/{id}. Served by Compliance_euapi; returns only the caller's own cases — a mismatched id returns 404 (hides existence).

Both are documented in the generated OpenAPI specs and Postman collections; their URLs and operation names are unchanged from the pre-module build.

Audit log

Every create, update, and delete across all twelve areas writes a System Logs entry under the Compliance category. Those events also feed the in-suite Audit Log screen (compliance/audit), which is read-only and append-only with an integrity panel — nobody can edit or remove an entry. Grant compliance_audit to reviewers who need to inspect the trail without touching operational data.

Demo-data management

Sample data for demos and training is operator-driven, never installed automatically:

php erpat db:seed ComplianceDemo            # load sample data across every area
php erpat db:seed ComplianceDemo --dry-run  # preview without writing
php erpat db:seed ComplianceDemo --tenant=<key>   # one tenant
php erpat db:seed ComplianceDemo --all      # main DB + every active tenant
php erpat db:seed ComplianceDemo --remove   # soft-delete the demo data again

The seeder is idempotent and its --remove path is a soft delete, so you can load and unload it safely in non-production environments.

Was this guide helpful?

Report a content problem