Production Reference Public

Permissions & Roles

Administration Permissions & Roles Everything about who can see and use each part of Production & Manufacturing — the two module toggles that make the feature visible, how…

Guide version: r1 Module version: 1.0.0 Updated: 2026-07-22 Estimated time: 11 min 2 views
Administration

Permissions & Roles

Everything about who can see and use each part of Production & Manufacturing — the two module toggles that make the feature visible, how permissions are surfaced in the Role editor and enforced in the code, the complete permission-key reference, and a suggested role-to-permission map.

????
Who this is for. This page is for an administrator granting access. If you have not enabled the module yet, do that first in Getting Started — this page assumes the tables exist and the module can be turned on.

How access control works

Production uses ERPat's standard role-based access control (RBAC). Access is decided by two independent things, and both must line up before a user can reach a feature:

????
Module toggles

Tenant-wide on/off switches that make an entire area exist. module_production is the master; module_manufacturing is a sub-feature beneath it. When a toggle is off, the whole area is hidden — even for administrators.

????
Permissions

Per-role keys stored against each user, granted in the Role editor. A permission decides whether a specific sidebar item and its actions appear within an area that is already switched on.

Surfaced in the Role editor, enforced in the controllers

The permission keys shown below are auto-discovered from the installed module and appear in the Role editor → Permissions matrix, grouped by category. When a user requests a page or an action, the same keys are checked in the module's controllers. Two check styles run side by side:

LayerHow it checksNotes
Legacy web gate with_permission() / current_has_permit() The dominant style across the module's web controllers.
Modern guard $this->can() / $this->guard->hasModuleAccess() Newer code path; used by guards and the End-User API.
????
Both layers read the same stored permissions — the serialized users.permissions list. There is no separate permission store for legacy vs. modern code, so granting a key in the Role editor takes effect everywhere at once.
ℹ️
Administrators bypass permission checks. An admin role sees every Production and Manufacturing item as long as the relevant module toggle is on. You only need the keys below for non-admin roles.

The two module toggles

Nothing in this module appears until its area is switched on. The switches live in Settings → Manage Modules (master) and the tenant settings (sub-feature).

ToggleRoleWhat it unlocksWhen off
module_production
master
Master switch for the whole package. The Production sidebar group (Overview, Manufacturing Orders, Bill of Materials, Work Centers, Production Reports) and the /production/* APIs. Base Production group hidden; base web pages and /production/* endpoints return 404 module_unavailable.
module_manufacturing
sub-feature
Sub-feature toggle for the advanced area, gated beneath the master. The separate Manufacturing sidebar group (Dashboard, Work Centers, BOM, Work Orders, Quality Control, Requisitions, Costing, Labor, Compliance, ECOs, Settings) and the /manufacturing/* APIs. The Manufacturing group is hidden and all /manufacturing/* endpoints return 404 module_unavailable.
⚠️
module_manufacturing is a separate flag — enabling the master module_production does not auto-enable it. You must turn on module_manufacturing as well, or the entire Manufacturing sidebar group and every /manufacturing/* API stay hidden and return 404.
ℹ️
The disabled state deliberately returns 404 “This feature is not available.” rather than 403 — a 404 hides the feature's very existence, so callers cannot tell "not allowed" from "doesn't exist".

SOP — granting access in the right order

Toggle first, then permissions. Because permissions are only meaningful inside a switched-on area, granting a key while the toggle is off does nothing visible.

  1. Enable the area

    In Settings → Manage Modules, enable Production (sets module_production = 1). For the advanced tools, also enable Manufacturing (module_manufacturing = 1).

  2. Open the Role editor

    Go to Roles and open the role you want to change. The Production and (if enabled) Manufacturing permission categories appear in the permissions matrix.

  3. Grant the base permission first

    For each area, tick the base (module-level) permission before its children — e.g. production for Manufacturing Orders, production_bom for Bill of Materials. The base key is what surfaces the sidebar item.

  4. Add Create / Update / Delete only where needed

    Tick the discrete _create / _update / _delete rows only for roles that should modify data. A role with just the base key gets read-only access to that area.

  5. Save and verify

    Save the role. A menu item appears only for permissions the role holds; the group header appears when the user can see at least one child item.

A granted API scope is not enough on its own. Even with production:read or manufacturing:read, an endpoint returns 404 module_unavailable when the matching module toggle is off. The scope grant and the tenant toggle must both be set. See the API reference for scope details.

Permission reference

Every permission key the module publishes, grouped the way the Role editor groups them. In each table: key is the stored permission string, Label is the human name shown in the matrix, and Grants is what holding it unlocks. Base keys surface a sidebar item and read access; the three child keys add write actions.

Base Production — Manufacturing Orders

Permission keyLabelGrants
productionManufacturing OrdersBase module access. Unlocks the Overview and Manufacturing Orders sidebar items and the /production/orders API. Category Production: Manufacturing Orders; action Manage Manufacturing Orders.
production_createCreate Manufacturing OrderCreate a new Manufacturing Order.
production_updateUpdate Manufacturing OrderEdit an existing Manufacturing Order.
production_deleteDelete Manufacturing OrderDelete a Manufacturing Order.

Base Production — Bill of Materials

Permission keyLabelGrants
production_bomBill of MaterialsBase access. Unlocks the Bill of Materials sidebar item and the /production/boms API.
production_bom_createCreate Bill of MaterialsCreate a new base BOM.
production_bom_updateUpdate Bill of MaterialsEdit an existing base BOM.
production_bom_deleteDelete Bill of MaterialsDelete a base BOM.

Base Production — Work Centers

Permission keyLabelGrants
production_work_centerWork CentersBase access. Unlocks the Work Centers sidebar item and the /production/work-centers API.
production_work_center_createCreate Work CenterCreate a new base work center.
production_work_center_updateUpdate Work CenterEdit an existing base work center.
production_work_center_deleteDelete Work CenterDelete a base work center.

Base Production — Reports

Permission keyLabelGrants
production_reportProduction ReportsAction Access. Unlocks the Production Reports sidebar item and the /production/reports/* API. Read-only — there are no create/update/delete children.

Manufacturing — Overview (Dashboard)

Permission keyLabelGrants
manufacturingManufacturing DashboardAdvanced-area base access. Action Access Manufacturing. Unlocks the Manufacturing group's Dashboard and /production/overview when in the advanced context.

Manufacturing — Work Centers

Permission keyLabelGrants
manufacturing_work_centerWork Centers (Mfg)Unlocks the advanced Work Centers item and the /manufacturing/work-centers API.
manufacturing_work_center_createCreate Work Center (Mfg)Create an advanced work center.
manufacturing_work_center_updateUpdate Work Center (Mfg)Edit an advanced work center.
manufacturing_work_center_deleteDelete Work Center (Mfg)Delete an advanced work center.

Manufacturing — Bill of Materials

Permission keyLabelGrants
manufacturing_bomBill of Materials (Mfg)Unlocks the advanced (versioned, multi-level) BOM item and the /manufacturing/boms API.
manufacturing_bom_createCreate BOM (Mfg)Create an advanced BOM version.
manufacturing_bom_updateUpdate BOM (Mfg)Edit an advanced BOM version.
manufacturing_bom_deleteDelete BOM (Mfg)Delete an advanced BOM version.

Manufacturing — Work Orders

Permission keyLabelGrants
manufacturing_work_orderWork OrdersUnlocks the Work Orders item and the /manufacturing/work-orders API.
manufacturing_work_order_createCreate Work OrderCreate a work order.
manufacturing_work_order_updateUpdate Work OrderEdit a work order.
manufacturing_work_order_deleteDelete Work OrderDelete a work order.

Manufacturing — Quality Control

Permission keyLabelGrants
manufacturing_qualityQuality ControlUnlocks the Quality Control item and the /manufacturing/qc-plans, /inspections, /ncrs and /capas APIs.
manufacturing_quality_createCreate QC RecordsCreate QC plans, inspections, NCRs and CAPAs.
manufacturing_quality_updateUpdate QC RecordsEdit QC records.
manufacturing_quality_deleteDelete QC RecordsDelete QC records.

Manufacturing — Material Requisitions

Permission keyLabelGrants
manufacturing_requisitionMaterial RequisitionsUnlocks the Material Requisitions item and the /manufacturing/requisitions and /manufacturing/issues APIs.
manufacturing_requisition_createCreate RequisitionCreate a requisition.
manufacturing_requisition_updateUpdate RequisitionEdit a requisition.
manufacturing_requisition_deleteDelete RequisitionDelete a requisition.

Manufacturing — Costing

Permission keyLabelGrants
manufacturing_costingProduction CostingAction Access Production Costing. Unlocks the Production Costing item and the /manufacturing/costing/standard and /actual APIs. No create/update/delete children.

Manufacturing — Labor Tracking

Permission keyLabelGrants
manufacturing_laborLabor TrackingUnlocks the Labor Tracking item and the /manufacturing/labor and /manufacturing/downtime APIs.
manufacturing_labor_createCreate Labor EntryCreate a labor / downtime entry.
manufacturing_labor_updateUpdate Labor EntryEdit a labor / downtime entry.
manufacturing_labor_deleteDelete Labor EntryDelete a labor / downtime entry.

Manufacturing — Compliance

Permission keyLabelGrants
manufacturing_complianceCompliance DocumentsUnlocks the Compliance Docs item and the /manufacturing/compliance and /compliance/expiring APIs.
manufacturing_compliance_createCreate Compliance DocumentCreate a compliance document.
manufacturing_compliance_updateUpdate Compliance DocumentEdit a compliance document.
manufacturing_compliance_deleteDelete Compliance DocumentDelete a compliance document.

Manufacturing — Engineering Changes

Permission keyLabelGrants
manufacturing_ecoEngineering Change OrdersUnlocks the ECO item and the /manufacturing/ecos API.
manufacturing_eco_createCreate ECOCreate an engineering change order.
manufacturing_eco_updateUpdate ECOEdit an engineering change order.
manufacturing_eco_deleteDelete ECODelete an engineering change order.

Manufacturing — Settings

Permission keyLabelGrants
manufacturing_settingsManufacturing SettingsUnlocks the Settings item, the /manufacturing/settings API, and — used as the reference gate — the /manufacturing/uoms (units of measure) API.
ℹ️
Units of measure share the Settings gate. The /manufacturing/uoms endpoint is treated as shared reference data, so it is gated by manufacturing_settings rather than a dedicated UoM permission. There is no separate "manage units" key.

Base vs. Create / Update / Delete

Read the legend below before assigning keys. The base key is read-only; the three child keys are the only write grants.

base keyView / read. Surfaces the sidebar item and read access to its list & detail pages (and the matching read-only API). No editing.
_createCreate. Adds new records in that area.
_updateUpdate. Edits existing records in that area.
_deleteDelete. Removes records in that area.
????
A view-only role gets just the base key. A full editor gets the base key plus all three _create/_update/_delete children. Reports (production_report), Overview (manufacturing), Costing (manufacturing_costing) and Settings (manufacturing_settings) have no child keys — they are single, access-only permissions.

Suggested role mapping

These roles are conventions, not hard-coded — ERPat ships no fixed "Planner" or "QC Inspector" role. Grant the permission groups below to whatever roles your organisation actually uses. A ✓ marks the base permission for that group; give the matching _create/_update/_delete children to roles that should modify data (typically the ones marked ✓ for their own area).

Planner Operator QC Inspector Cost Accountant Engineer Compliance Officer Administrator
Permission group Planner Operator QC Inspector Cost Accountant Engineer Compliance Officer Administrator
production — Manufacturing Orders ····
production_bom — Bill of Materials ····
production_work_center — Work Centers ·····
production_report — Production Reports ····
manufacturing — Mfg Overview / Dashboard
manufacturing_work_center — Work Centers (Mfg) ·····
manufacturing_bom — Bill of Materials (Mfg) ····
manufacturing_work_order — Work Orders ····
manufacturing_quality — Quality Control ·····
manufacturing_requisition — Material Requisitions ····
manufacturing_costing — Production Costing ·····
manufacturing_labor — Labor Tracking ····
manufacturing_compliance — Compliance Docs ·····
manufacturing_eco — Engineering Changes ·····
manufacturing_settings — Settings & UoM ······
ℹ️
How to read the table. ✓ = grant this group's base permission to that role; · = leave it off. The Administrator column is shown for completeness — admins bypass permission checks entirely, so you never need to tick keys for a true admin role. Reports, Overview, Costing and Settings have no write children, so a ✓ there is always view/access-only.

What each role typically does

PlannerOwns setup and scheduling: creates BOMs, work centers, Manufacturing / Work Orders and requisitions; reads reports.
OperatorRuns the floor: starts/completes orders, records labor & downtime, issues materials against requisitions.
QC InspectorQuality only: runs inspections, records measurements, raises NCRs and CAPAs.
Cost AccountantCosting & reporting: maintains standard costs, reviews actual cost and variance, reads reports and labor.
EngineerDesign control: maintains BOM versions and raises Engineering Change Orders.
Compliance OfficerTracks permits and certificates and their expiry windows.
AdministratorFull access to everything the enabled toggles expose; also manages the toggles and the roles themselves.

Enforcement & error messages

Once toggles and permissions are set, the module enforces them consistently across the web UI and both API surfaces. The read-only APIs surface a small set of standard responses when access is missing:

SituationResponseMessage
Module toggle is off404 module_unavailable“This feature is not available.” — a 404 to hide the feature's existence.
End-User API caller lacks the web permit403 forbiddenMissing permit is refused (administrators bypass this check).
Client API token lacks the scopeAuthorization failureVia authorizeScope('production:read') / authorizeScope('manufacturing:read').
Any non-GET verb on a read-only endpoint405 invalid_request“Method not allowed.” with allowed=[GET].
⚠️
The End-User API is not self-scoped. Both API surfaces return the same org-wide JSON; only the authorization differs (OAuth scope for the Client API vs. the staff member's web permit for the End-User API). A user who holds the permit sees organisation-wide data, not just their own records.

Next steps

Was this guide helpful?

Report a content problem