Stock Access Rules for Dolibarr
Stock Access Rules restricts each user to the warehouses he works in. For every user and every warehouse you choose View only or View and operate. Forbidden warehouses disappear from lists and selectors, and stock operations in them are refused, from the screens as well as from the API. Inspired by the Odoo app "Stocks Access Rules", with many more options.
Per-user warehouse restrictions
- For each user and each warehouse: no access, view only or view and operate.
- A warehouse with no assigned user stays open to everybody (can be switched to closed in the setup).
- As soon as users are assigned to a warehouse, it is restricted to them.
- Inheritance: access given on a parent warehouse is also granted on its sub-warehouses (optional).
- Exempt users: administrators and users with the Super Warehouse Manager permission see and operate every warehouse.
What is filtered
- The warehouse list and the warehouse card (forbidden warehouses are hidden and the card is refused).
- The stock movements list: movements of forbidden warehouses are hidden.
- The warehouse selectors of the forms: users only see the warehouses they can operate.
What is blocked
- Stock movements in warehouses the user cannot operate.
- Validation of shipments and receptions that use a forbidden warehouse.
- Warehouse changes (modification and deletion).
- The controls apply to the screens and to the API.
- Clear messages tell the user why the operation is refused.
Blocked attempts log
- Every refused operation is recorded: stock movement, shipment, reception, warehouse card, change or deletion.
- Searchable list reserved to users with the permission to read the log.
- Retention in days with a daily automatic purge, and a button to purge the log manually.
Tools to manage the rules
- Access matrix: users in rows, warehouses in columns, set the level of each cell.
- Rules by warehouse: overview of the protection of each warehouse and of its authorised users.
- Simulator ("Check an access"): choose a user and a warehouse to see what the user can do.
- Dashboard: warehouses, restricted and open warehouses, users with rules, number of rules, blocked attempts over 30 days, blocked attempts by operation and latest blocked attempts, plus a home widget.
- A "Warehouse access" tab on the user card and an "Access rules" tab on the warehouse card, showing direct and effective (inherited) access.
Setup and permissions
- 10 setup options: open warehouses without user, inheritance, administrators exempt, filter lists and protect the card, filter selectors, block movements, block shipments and receptions, log blocked attempts, default level of a new rule, log retention.
- 5 permissions: read rules, create and modify rules, delete rules, Super Warehouse Manager, read the blocked attempts log.
Quality
- Dolibarr 15 up to the latest version, PHP 7 to 8, GPL v3 or later.
- Permissions, scheduled job, hooks and triggers following Dolibarr standards.
- Demo data set (a tree of warehouses, demo users with their rules, products with stock and blocked attempts), loaded automatically at activation on demonstration platforms, and removable in one click.
- Translations for all Dolibarr languages.
