I have facing one issue. The issue is I want to two-level hierarchy, First one is Employee and the second one is Project Manager.
Project manager can see their own details and all the employee details but in one Doc type(Say: employee) the PM can’t see some of the employee details like “Salary details”, “Passport number”, “DOB”, but they can see their own(PM) data and they can edit it their own data.
In Employee user, they can see and edit their details including DOB, Salary details and passport number.
If we have assigned one employee in the “reports to” field in employee doc type, that employee details can be accessed by the Manager or which employee we have added in the “reports to” field. In that case, we have two roles 1)Employee and 2)Manager(PM).
Doc type: Employee
1)Employee: The employee can see and edit their own details. Employee can’t see other employees details.
2)Manager(PM): The manager can see and edit their own data and reportees data but some of the reportees fields, that can’t see by the manager, Like: “Salary details”, “Passport number” and “DOB”, but PM should see and edit his details including “Salary details”, “Passport number” and “DOB”.
Thanks @NCP for your quick response. I have referred to the above blogs and tried the way they have been explained. I am still facing the issue. I am explaining my requirements and the issue in detail here for more clarity.
I have 2 personas as Employee and Manager
For the employee doctype,
- the Employee should have permission to view/edit ONLY his data
- the Manager should have permission to view/edit his data + access his reportees data with some field restrictions (eg: Employee’s Pancard No should not be visible to the manager).
Employee req: It’s working by default
Manager req: Accessing reportees data could be done by using ‘ReportsTo’ field and restriction in the field can be done by field level permission using perm level
Accessing reportees data is achievable. but, when I restrict a field of the reportee (eg:pancard no) using perm level, it’s impacting even my data and not able to see my pancard no.
Hope you understood my issue. Can you pls help me to resolve this issue? Thanks.