IanaiERP
Log InGet Started

The AI Driven ERP Solution

IanaiERP

IanaiERP is not just another ERP system. It is an AI-driven operational platform designed for modern manufacturing, wholesale, and eCommerce businesses.

Platform

  • Platform Overview
  • Inventory
  • Manufacturing
  • Sales & Fulfillment
  • Procurement
  • Finance
  • CRM
  • Integrations
  • Reporting

Industries

  • Manufacturing
  • Wholesale & Distribution
  • Food & Beverage
  • Cosmetics & Skincare
  • Biopharmaceutical
  • Fashion & Apparel

Resources

  • About Us
  • Case Studies
  • Blog
  • FAQ
  • User Guide
  • Contact

Contact

  • Address

    1440 N Lakeview Ave
    Anaheim, CA 92807

    Get Directions
  • Emailinfo@ianaierp.com

© 2026 IanaiERP. IanaiERP. All rights reserved.

Privacy PolicyTerms of ServiceLicense
Permissions & Modules

Guides

⌘K

getting-started

  • Intro - ianai Total ERP SolutionPopular
  • Settings / Preferences
  • Dashboard (List View) & Reports
  • Data Import/Export

inventory

  • ItemPopular
  • Inventory Adjustment
  • Inventory Transfer
  • Lot Tracking
  • Bin Tracking
  • Item Options and Dynamic Templates
  • Serial Tracking

manufacturing

  • Bill of Materials (BOM)
  • Build
  • Routing
  • Work Orders
  • Work Plan
  • BOM Rule
  • Advanced Manufacturing

purchase

  • Procurement Workflow
  • Vendor
  • Purchase Order
  • Item Receipt
  • Blanket Purchase Order

sales

  • Sales Workflow
  • Customer
  • Estimate
  • Sales Order / Payment
  • Price Rule
  • Blanket Sales Order
  • Work Centers

shipping

  • Shipment
  • Shipping, Label Printing, and Tracking
  • Carrier Integrations
  • Ship Method Mapping
  • Rule-Based Automation
  • International Shipping
  • Third-Party Billing
  • ianaiERP Bridge
  • Troubleshooting Shipping Issues
  • USPS Cubic Rates in ianaiERP
  • USPS Pricing

return

  • Returns

miscellaneous-setup

  • Miscellaneous

customization

  • Custom Field
  • Custom Script
  • Vendor-Item Catalog
  • Units of Measure (UOM)

integration

  • Quickbooks Online Integration
  • Bigcommerce Integration
  • Shopify Integration

accounting

  • Journal
  • Transfer Funds
  • Bank Deposit
  • Expense
  • Chart of Accounts

equipment

  • Introduction
  • Equipment Hub
  • Work Centers for CAPA
  • Asset Management
  • Preventive Maintenance
  • Maintenance Events
  • Spare Parts & Consumables
  • Capacity Planner
  • Runtime Status
  • Permissions & Modules
DocsPermissions & Modules

Permissions & Modules

The EMS + CAPA suite follows ianaiERP's existing two-tier permission model:

  1. Module entitlements (per tenant) — toggles a whole feature on or off for the tenant. Stored in common_keyvalue under the MODULE_PERMISSION key.
  2. Granular permissions (per user) — fine-grained read/write bits. Stored on the user and merged with the tenant's enabled modules at request time.

A user can only exercise a granular permission if BOTH the user has the bit AND the tenant has the module enabled. This means a single user object stays the same when their tenant turns CAPA on or off — the merge happens server-side on every API call.

Module entitlements (tenant-level)

EntitlementWhat it turns on
EQUIPMENT_PERMITTEDEquipment Hub, asset status board, runtime status updates, asset detail page, work-center CAPA fields
CAPA_PERMITTEDCapacity Planner page, capacity heatmap on the hub, CapaSnapshot RPCs, recompute
MAINTENANCE_PERMITTEDMaintenance Hub, PM schedules, maintenance events, spare-part links, low-stock alerts

Each entitlement is independent. A tenant can enable any combination — the Equipment Hub renders graceful "Enable {Module}" empty states for widgets whose module is off.

How to enable an entitlement

Admin path (ianaiERP staff): edit the tenant's MODULE_PERMISSION JSON in common_keyvalue to add the relevant *_PERMITTED string to the enabled modules array.

User-facing path (for self-serve tenants on the Business plan): Settings → Subscription → enable the addon module.

What happens after enabling

  1. The tenant's MODULE_PERMISSION row gets updated.
  2. The next API call from any user in that tenant runs through the auth middleware, which reads the row and applies ModuleToPermissionMap to fill in the corresponding granular bits.
  3. The sidebar refreshes, exposing the new menu items.
  4. The Equipment Hub starts rendering the previously-gated widgets.

No restart needed; no per-user provisioning needed.

Granular permissions (user-level)

These are bit-level permissions stored on each user. The seven new ones added for the EMS suite:

Permission keyGrants
equipment_readView Equipment Hub shell, KPIs, status board, alerts feed
equipment_writeSave dashboard layouts, trigger on-demand recompute, edit hub widget settings
equipmentstatus_writeUpdate an asset's runtime status (operator-level — does NOT grant accounting edits)
capa_readView Capacity Planner, heatmap, snapshots, ETAs
capa_writeRecompute capacity on demand, run "what-if" scenarios, drag-reschedule operations
maintenance_readView PM schedules, maintenance events, spare-part links, downtime history
maintenance_writeCreate/edit PM plans, log/complete maintenance events, mark PM done, link spare parts

Reuse of existing permissions:

  • Spare-part item flags (is_spare_part, safety_stock_qty) reuse item_read / item_write.
  • Asset hierarchy edits (parent reassign, move subtree) reuse asset_write.
  • Work Center CAPA fields reuse support_write.

Module → Granular mapping

When a tenant enables an entitlement, the auth middleware automatically grants the corresponding granular bits to users who already have those granular permissions assigned:

EntitlementAuto-granted granulars
EQUIPMENT_PERMITTEDequipment_read, equipment_write, equipmentstatus_write
CAPA_PERMITTEDcapa_read, capa_write
MAINTENANCE_PERMITTEDmaintenance_read, maintenance_write

This is gating, not granting — the user still needs the granular bit on their user record. The module entitlement just unblocks it.

Typical role recipes

These aren't built-in roles (ianaiERP doesn't have role presets yet) — they're patterns for assigning granular perms to users.

Plant manager

equipment_read, capa_read, maintenance_read
asset_read, item_read, support_read

Read-only everything in the suite. Sees the hub, the planner, the maintenance history. Can't make changes; can call attention to issues.

Production planner

equipment_read, capa_read, capa_write
asset_read, item_read, support_read

Can use the Capacity Planner to recompute and rebalance. Can't change asset status or maintenance events.

Maintenance lead

equipment_read, maintenance_read, maintenance_write
equipmentstatus_write
asset_read, item_read, item_write (for spare parts)
support_read

Creates PM plans, logs events, links spare parts, marks PMs done. Can flip asset runtime status (e.g. take something to MAINTENANCE before starting an event manually).

Floor operator (tablet)

equipment_read
equipmentstatus_write

Sees the hub, can flip asset runtime status. Cannot edit accounting fields, cannot create maintenance events (the auto-created BREAKDOWN event from a DOWN action is fine — they don't "create" it, the system does).

Finance / asset accountant

asset_read, asset_write
(no equipment_*)

Doesn't need the EMS suite at all. Works on /asset for acquisitions, depreciation, disposal.

Page-level gating in the UI

Each page checks both module + granular before rendering:

PageRequires (module)Requires (granular)
/equipment (Hub)EQUIPMENT_PERMITTEDequipment_read
/equipment/:assetId (Detail)EQUIPMENT_PERMITTEDasset_read
/equipment/capacity (Planner)CAPA_PERMITTEDcapa_read
/equipment/maintenance (Maintenance Hub)MAINTENANCE_PERMITTEDmaintenance_read
/workcenter (WC list)(no EMS module needed)support_read
/asset (Asset list)(no EMS module needed)asset_read

If either check fails, the page renders a NoPermissionBlur with a hint about what's missing.

Cross-module widget gating on the Hub

When a tenant has only some modules enabled, the Equipment Hub shows what it can:

Tenant hasHub rendersHub shows "Enable …" card for
Only EQUIPMENT_PERMITTEDShell, KPIs (partial), status board, alertsCapacity Heatmap, Today's PM Schedule
EQUIPMENT + CAPAAll of above + capacity heatmapToday's PM Schedule
EQUIPMENT + MAINTENANCEAll of above + PM schedule + maintenance alertsCapacity Heatmap
All threeFull hub—
NonePage returns a NoPermissionBlur—

This intentionally avoids hiding the cards — admins seeing the empty-state cards know what to enable.

Cross-permission action gating

For granular per-action checks (capa_write, maintenance_write, equipmentstatus_write), the UI reads from the merged-permission store:

const can = useUserState((state) => state.mergedPermission)

<Button disabled={!can?.capa_write}>Recompute</Button>

mergedPermission is the user's granular bits AND-ed with the tenant's enabled modules. Both must be true for the action to be enabled.

REST API auth

Every new HTTP path is registered in auth-ms's allowlist with the required granular perm:

Path prefixVerbRequired granular
/equipment/hubGETequipment_read
/asset/:id/statusPUTequipmentstatus_write
/asset/:id/treeGETasset_read
/asset/move-subtreePOSTasset_write
/workcenter (CRUD)*support_*
/maintenance/schedule (CRUD)*maintenance_*
/maintenance/event (CRUD + start/complete/markPmDone)*maintenance_*
/sparepart (CRUD)*maintenance_*
/capa/snapshot (list/get/getLatest)GETcapa_read
/capa/calculatePOSTcapa_write

Casbin enforces these per request. Calls without the bit return 403.

Troubleshooting

SymptomLikely cause
User can see the sidebar nav but the page returns NoPermissionBlurThe sidebar shows based on *_read; the page requires both the module entitlement and the read bit. Module is probably off.
Recompute button is greyed outUser has capa_read but not capa_write.
"Spare part" toggle doesn't saveUser lacks item_write.
Quick Menu missing on chipUser lacks equipmentstatus_write.
Module enabled in MODULE_PERMISSION but page still blockedCache. Force a re-login (the token holds permissions for the session lifetime).
New permission key isn't recognizedLibrary permission.go wasn't redeployed to the relevant service. Check permissionMap.

Related

  • Introduction → Module entitlements — how the modules slot into the broader platform
  • Asset Management → Permissions split — the asset_write vs equipmentstatus_write distinction
  • Runtime Status — the operator-tier permission in practice
PreviousRuntime Status

Still have questions?

Our support team is just a click away.

Create a support ticketGet in touch