How to retrieve data from another table after making a new connection between models

Developer in training here. Im working with an existing codebase that has some issues. Here is a little background information: When a company signs up for the app, all of the employees of that company are given login credentials, and from the doc mgmt area, anyone in the company can upload folders and files to that area, which is then available for viewing by everyone in that company through their respective accounts. There is a bug. Employee A cannot see any of the files uploaded by employee B. All the files/folders available on employee A’s doc mgmt area should be the same as the ones available on employee B’s doc mgmt area. From my understanding of the code (I might be wrong) it looks at the primary (parent/admin folder?) or employee folder. What it should do is look at the primary folder and the company folder. I made a new relationship between DocumentFolder and Company models… I am struggling to change the code in the views. Please assist…