My Application in zend framework, symfony,doctrine.
In my web Application have multiple clients which have it's their entities like product and product related to other entities. Below is my problem :
User Table(clients) :
id Name
----------------
1 A
2 B
Product Table :
id Name
-------------
1 Product-1
2 Product-2
3 Product-3
UserProduct Table :
id user_id product_id
1 1 1
2 1 2
3 2 3
Client 'A' go to edit product after login, Url : xyz.com/product?id=1
Now client 'B' go to edit product after login, Url : xyz.com/product?id=1
So client 'B' should not edit product id = 1.
Is it possible to make in general function?