Skip to main content

Endpoint rules: what each role may do

For: product owners, BAs and business admins. The rule: a person can do only what their role has ticked, and Zyrohs itself checks that on every request, not only the screens.

Until October 2026 the screens decided what a role saw, but the server behind them did whatever it was asked. Anyone who could sign in could add, change or delete anything by sending the request directly, without the screen. A3 makes the server the judge: every action declares the right it needs, and a request from a role without it is refused and recorded.

The four checks every request passes

The rules

  1. Every action names the right it needs.
    • It is the right you tick in the role editor, such as Sales › Sales List › Add.
    • When several screens offer the same action, any one of their rights is enough.
    • An action that names nothing is refused, and Zyrohs will not even start with one.
  2. The role is read exactly as the screens read it.
    • A screen counts only when it, and every screen above it, is ticked.
    • A permission counts only when it is ticked on that screen itself.
  3. New screens start switched off.
    • A screen added in an update is off for every role except the Administrator, until someone ticks it.
    • Otherwise every new feature would arrive already granted to every role.
  4. A few actions need no particular right, only that you are signed in:
    • your own account, password, two-step sign-in and sessions;
    • your screen preferences;
    • the business settings every screen needs to draw itself;
    • attaching a file.
  5. A few actions are for the Administrator only.
    • Data migrations.
    • Some deletions no screen offers: deleting a product, a contact or a production run outright, and changing a production run.
  6. A shared action asks for the right of the record it touches. One payment window serves sales, purchases, returns, expenses and contacts, so the server checks which document a payment is for:
Action Needs
Take, change or delete a payment on a sale Sales List › Payment, or Customers › Payment
… on a sale return Sales Returns › Payment, or Customers › Payment
… on a purchase / purchase return Purchases / Purchase Returns › Payment, or Suppliers › Payment
… on an expense Add Expense › Payment
Settle a customer's balance Customers, Sales List or Sales Returns › Payment
Settle a supplier's balance Suppliers, Purchases or Purchase Returns › Payment
Add a customer Customers › Add, or adding a sale or quotation, or POS (quick add)
Add a supplier Suppliers › Add, or adding a purchase or purchase order (quick add)
Add another contact (employee) Other Contacts › Add
Change a contact, or switch it on or off Edit on that contact's own type, as stored. Changing its type needs Edit on the new type too
Make a customer also a supplier (or the reverse), or stop it The other type's Edit (or Add), only when that actually changes
Make or change a sale Sales List › Add / Edit for any sale. POS covers only sales made at POS
Delete a sale; add, change or delete a quotation or sale order That list's own Delete / Add / Edit. A quotation right no longer reaches invoices
  1. A refusal changes nothing and is recorded.
  2. Attached files stay inside the business.
    • A file can only be saved in, and read from, the business's own storage.
    • Each upload gets its own place, so two files with the same name never overwrite each other.

What changed for shops

Before After
A hidden button was the only protection The server refuses what the role does not allow, whatever sends the request
A role with a right ticked only on a lower screen, or saved in an odd shape, still worked in places Read exactly; the pre-flight report lists such roles before the update (Runbook: release checks for the security release)
A cashier with POS could edit any invoice Only sales made at POS; others need Sales List › Edit
A quotation editor could delete or edit invoices Only quotations
A purchase payment right could delete a sale's payment Only payments on its own side
Anyone signed in could write files into another business's storage Refused

Decisions

Date Decision Reason
2026-10-06 Enforce every action at once, not report-only first A report-only phase leaves the hole open; roles are checked before the update instead
2026-10-07 Read roles exactly, like the screens; new screens start off One reading in both places; nothing new arrives pre-granted
2026-10-07 Actions no screen offers are Administrator only Nobody needs them day to day, and none can be granted piecemeal
2026-10-07 A pre-flight report per business before each update, and a refusals report after Find roles that would lose work before staff hit it
2026-10-22 A shared action asks for the right of the record it touches Otherwise one screen's right works on another screen's records
2026-10-22 POS may change only sales made at POS POS has no edit right of its own to tick
2026-10-22 Files stay in the business's own storage, one place per upload An upload could be aimed at another business's files

Open questions

Question Why it matters Options
Should opening an attached file check the record it belongs to? Anyone signed in can open any of the business's files if they know its address (attachments, staff documents) Check the owning record's right; or accept, as addresses are hard to guess
Should POS edits be limited further? A cashier can change any POS sale, any day, at their branches Own register or session only; same day only; or as now
Run the safety checks on every pull request Today they run on developers' machines and at start-up only Add them to CI