Different stocks_location for each Employee. #4120
Unanswered
AtaloConAlambre
asked this question in
Q&A
Replies: 1 comment
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, how are you?
I am configuring OSPOS so that there is a single Administrator User, and the rest are Employees with limited access to the different actions that can be performed within the platform. Now, without having to create different OSPOS instances for different items, it occurred to me that each Employee has access to only one Stock belonging to a certain item. Using “stock_location” I can generate one Stock per item, so if there are five different items, there will be five different Stocks. The issue is that I also need to limit the access of each Employee to the different Stocks, for example Employee user_id 2 should only be able to work with a specific Stock for a specific item and not be able to enter, modify or work with the other Stocks. And so with the rest of the Employees and Stock by category. First it occurred to me to create, in the database, a new table called
user_locations
that associatesuser_id
withlocation_id
. This table will allow you to define which users have access to which Stock locations by relatinguser_id
(the user identifier) tolocation_id
(the Stock location identifier). My intention is that these permissions can only be done through the database, without having to modify anything in the graphical environment of the OSPOS platform; and furthermore, it can only be done by the only Administrator User who has permissions and full access to the OSPOS platform.But I guess I need to modify the code in the “location.php” file to include a filter that retrieves only the locations associated with the user, and that's where I need help because I don't know much about programming and I'm kind of lost on that point.
Whoever can give me a hand, I appreciate it in advance.
Beta Was this translation helpful? Give feedback.
All reactions