User permissions for Warehouses

Been scratching my head over this for last 24 hours!

I’ve added user permission to role sales coord (which has read access to warehouse) to limit warehouse access.

Added user permission for user abc. Yet am unable to view any warehouse!

on ERPNext v8.3.6
FRAPPE 8.3.10

The following shows how to fix it, but all warehouses are visible in warehouse tree to the user.
Also parent warehouses are also shown with the solution, so not exactly a fix.

1 Like

Issue replicating. Created Github Issue for the same. Role Permission not being applied on tree masters · Issue #9967 · frappe/erpnext · GitHub

1 Like

Hi @rijul,
You have to also give permission for the immediate parent of that node in order to be accessed by a particular user. Giving the parent warehouse permission user will only be able to access the permitted warehouse only. The same will apply for every tree structure in ERPNext. You can correlate this with the following example. Suppose there are few files in a folder and you have applied the user permission in files and folders. Then you can’t access the file if you don’t have the access to that folder. If you have access to the folder still you need to get the access for individual files.
Hit comment if you still have any doubts.