ListView and Permission Level

Hello;

Where in the code (just direct me to the file) that I can customize the code that is responsible for displaying the fields that will be displayed in the listview. I know that I can do this from the doctype by selecting In List View, but this is not enough because currently the fields are appearing even if the permission level for the user is not allowing him/her to view the field. So it seams, this need to be resolve from the code it self. So from where?

Regards
Bilal