Skip to main content

Who can do what

This page shows which default role may use each button of the order screens, and which web action and API right stand behind it. It describes the defaults that a new database gets. An administrator can change every cell in Users & Roles > Permission Matrix. A change made there wins over this page.

Two gates apply to a button:

  1. The web action. The server checks that the role may run the action behind the button. A refusal reads Forbidden("{action}").
  2. The API right. The action calls an API method. The method has its own list of roles. A refusal comes from the method.

A button works only when both gates are open.

Roles​

ADMIN, MANAGER, SUPERVISOR, OPERATOR and VIEWER. ADMIN and MANAGER may use everything on this page.

Screens and buttons​

WhatWeb actionAPI methodSUPERVISOROPERATORVIEWER
Open the list and the order (read)the list formslist_shipment_order, get_shipment_order, get_shipment_order_full, list_shipment_order_line, get_order_type, list_order_typeYesYesYes
Newgeneric_newget_next_key (the number)YesYesNo
Save (order)shipment_order_saveshipment_order_create, shipment_order_updateYesYesNo
New line, Save lineshipment_order_line_saveshipment_order_line_upsertYesYesNo
Delete lineshipment_order_line_deleteshipment_order_line_removeYesYesNo
Lines grid Save, Discard changesshipment_order_lines_grid_save, shipment_order_lines_grid_discardshipment_order_line_upsert, shipment_order_line_adjust_qtyYesOpen lines: yes. Launched or reserved lines: no.No
Release (dry run first)shipment_order_releaseshipment_order_validate, shipment_order_releaseYesNoNo
Allocateshipment_order_allocateshipment_order_allocateYesYesNo
Unallocateshipment_order_unallocateshipment_order_cancel_allocationYesNoNo
Delete Selected (picks)pick_detail_delete_selectedpick_detail_deleteYesNoNo
Cancel Qtyshipment_order_line_cancel_qtyshipment_order_line_cancel_qtyYesNoNo
Cancel (order)generic_rpc_commandshipment_order_cancelYesNoNo
Return to Poolgeneric_rpc_commandtask_force_releaseYesNoNo
Reassigngeneric_rpc_commandtask_reassignYesNoNo
Delete Tasktask_delete_confirmtask_delete_manyYesNoNo
Close (no button)noneshipment_order_closeAPI onlyNoNo
Preview allocation (no button)noneshipment_order_allocate_previewAPI onlyAPI onlyNo

How the cells were found:

  • Web actions. crates/libs/wms-lib-auth/src/authorization/seeder.rs:34-200 (the lists of actions that OPERATOR and SUPERVISOR get). ADMIN and MANAGER get every action. VIEWER gets only the read actions (list refresh and queries).
  • API rights. The seed block of crates/libs/wms-lib-sql/sql/wms-app/migrations/001_baseline.sql (search shipment_order_release in the enterprise.role_permission insert). It gives the rows for ADMIN, MANAGER, SUPERVISOR and OPERATOR.

Remarks:

  • OPERATOR has no right to release, cancel, unallocate, delete picks, cancel a quantity or change the quantity of a launched or reserved line. The rule: building a draft is data entry; committing stock or giving it back is a supervisor decision.
  • The Ordered cell and box are offered to every role on purpose. An operator who types a number into a launched line is refused by the command with the sentence Permission denied: changing the ordered quantity of a launched or reserved line is a supervisor action — ask a supervisor to make this change. The screen does not hide the field per role.
  • generic_rpc_command is open to OPERATOR and SUPERVISOR. It only carries the request. The right that decides is the API right of the command behind it.
  • Release does not need a second right for the stock reservation it makes. The right to release covers it.
  • The reads for VIEWER come from the default roles of the read methods. The baseline seed block has no VIEWER rows for the order methods.

Not confirmed by code: that VIEWER really sees the menu item Outbound > Orders and can open an order. The API read rights and the read actions are open to VIEWER by default, but the grant of the menu item and the forms was not traced. To verify: sign in as a VIEWER and open Outbound > Orders.

Not confirmed by code: the pick lists on the header and the line (owners, customers, order types, SKUs) need their own read rights. They are not listed above. To verify: sign in as an OPERATOR, press New, and open each pick list.

The default roles of the methods in the code​

The code that declares the methods also lists default roles for each method (crates/services/app-server/src/web/rpcs/shipment_order_commands_rpc.rs:46-58). That list is narrower than the seed block for some methods:

MethodCode default rolesBaseline seed also grants
shipment_order_create, shipment_order_update, shipment_order_line_upsert, shipment_order_line_removeADMIN, MANAGERSUPERVISOR, OPERATOR
shipment_order_validateADMIN, MANAGERSUPERVISOR, OPERATOR
shipment_order_close, shipment_order_cancel_allocation, pick_detail_delete, shipment_order_line_adjust_qtyADMIN, MANAGERSUPERVISOR

The RBAC seeder at start-up only adds rows that are missing and never removes a row (crates/services/app-server/src/app.rs:337-345, the last argument false). So on a database built from the baseline the seed block wins, and this page is right. A forced reseed from the administrator API overwrites the rows that the system wrote with the code defaults (seeder.rs, run_seeder_with_force). After such a reseed the narrower code defaults apply.

  • Order screen
  • Order statuses and transitions
  • Administrator guide: roles are changed in Users & Roles > Permission Matrix.
  • API: the methods in the table. All commands need meta.idempotency_key. The stateful ones also need the version in data.
  • RF terminal: not applicable.