In my drupal site I need to restrict the access of a view to certain users. The senario is like, each user will be assigned to a certain Item. Each item is a view. The users relation to the items is defined in a mysql table. Now what I need is, When ever a user clicks on a pirticular view (item) I need to check if he has access to that. Where can I write the code for this ?