Restrict employee to only his data except a few doctypes

I want to restrict employees to their own data which is done by ‘create user permissions’ but I want them to see leave applications of employees working under him. I can find that either we see all the data or nothing, if any code modifications are possible then let me know to make this work.
Inshort an employee can see only and only leave applications of employees working under him nothing else

Hi @Khadija , am looking for the same thing. Did you get a solution ?

I was not able to do it using permissions what I wanted to hide specifically was employees profile from their leader so I set in the code that whenever an employee is created I set their doctype’s owner to themselves, and read permission was given to an employee if he is owner.
In this way every employee except hr managers can view only their profiles and there leader can view their attendance and leave applications

Thanks a lot, let me try the same .