How can I make sure a user only sees his own media??

I have added a few custom roles to my network. They work fine and the capabilities are as I have specified.
The thing is that every user when write a post can see the media files of all users.

How can I add a restriction to the role (or any different way) to make sure a user only sees his media files?