Panels with some identical resources

Hello,

I have a application with 3 different panels (admin, factory and storekeeper).

Basically:
Admin panel can access with the guard user and role admin;
Factory panel can acess with guard factory;
Storekeeper panel can acess with guard shop;

The admin can access all the resources;
The factory can access just products and sales resources, and there must be logic to search only for products related to the factory logged in.
Storekeeper mantain the factory logic, acessing just the sales and products related to the storekeeper logged in.

What would be the correct way to block these resources depending on the panel? Is there any way to have a variable in the resource (like $factoryCanAcess: bool), and inside each panel in discoverResources i check for the variable?
Was this page helpful?