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.