Only Select Roles can see a group of employee's salary based on Payroll Frequency

Good day,
I would like only the HR Manager to see salary structure, salary slips, additional salaries for employees with Monthly as their Payroll Frequency

But the rest of HR roles can do the payroll for everyone else (weekly paid)

I have tried User Permissions, but those only filter/limit access based on the document name and not the document’s field

Thank you

As a workaroud, try to use “User Permissions” for “Employee ID/number” and give access to HR manager User to all those employees with Monthly Payroll frequency.

But that means I will have to create numerous User Permission for each “Employee ID/Number” in the Monthly Payroll Frequency category?

You can always use permission hooks and add conditions in your code.

https://frappeframework.com/docs/user/en/python-api/hooks#document-permissions

Thank you, will look into this as well!