User permission bug

i created a user permission where a user was restricted to view employee records in employee doctype apart from his but could access employee records in other doctypes. but the rule was applying to all doctypes yet it was not supposed to do so.