Add an Association from Warehouse to Account . Then to Warehouse’s Accessrules add a rule for role Warehousemanager, having XPath-constraint:
[YourModule.Warehouse_WarehouseManager='[%CurrentUser%]']
Then in the microflow-properties in block Security set ‘Apply entity access’ to Yes and set 'Allowed roles’ to Warehousemanager.
Does that get you what you need?
You have associations warehouse-accessobject-user.
You could set up an xpath constraint on your warehouse saying:
[module.warehouse_accessobject/module.accessobject/module.accessobject_user = [%CurrentUser%]]
Now you can create access objects and map them to warehouses and users. The users now only have access to the warehouses they are mapped to.