I am working on PHP YII (Version 1.15) User management application.
My Scenario: A user can be assigned as supervisor and there are 'n' numbers of subordinates can assign to the user. Likewise, there are many supervisor available in the application. All users details falls in one table.
Objective: I want to give access to the supervisor to Edit and Delete only to the assigned subordinates. Other users data, he can't able to modify.
What I Tried: I am validating the call everytime before the supervisor clicks the edit button of the subordinates. (I have many forms, so have to use the code many places repeatedly)
Please help me to solve this issue.