# Granular access to files depending on other collections

**URL:** <https://community.directus.com/t/granular-access-to-files-depending-on-other-collections/1010>\
**Category:** Help\
**Tags:** authentication\
**Created:** [August 20, 2025, 3:37pm UTC](https://community.directus.com/t/granular-access-to-files-depending-on-other-collections/1010 "2025-08-20T15:37:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stupremee](https://sea2.discourse-cdn.com/flex002/user_avatar/community.directus.com/stupremee/32/780_2.png) [@Stupremee](https://community.directus.com/u/Stupremee)\
**Post date:** [August 20, 2025, 3:37pm UTC](https://community.directus.com/t/granular-access-to-files-depending-on-other-collections/1010/1 "2025-08-20T15:37:24Z")

</div>

Hello,

I’m currently trying out Directus for one of my projects. I have the following simplified structure.  
There is a `projects` collection, and each project can have multiple files files attached. Additionally, the `projects` collection has a `assignedToUser` field, which contains a reference to a directus system user.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/directus/original/1X/9ebf7a7abe7f4849f2138ca86f43de612af7184e.png)

Now I want to create an access policy, so that a user with this policy can only see files that are linked to the projects he is assigned to. For the policy I have set up access to the `projects` and `project_files` collections by just checking if the `assignedUser.id` field is equal to the current user. However, to see and odnwload the files, he also needs access to the system files table on these specific files. How would I set up a filter condition there, so the user is not able to see all files?

---

<div class="post-metadata">

**Author:** ![ahmad\_quvor](https://sea2.discourse-cdn.com/flex002/user_avatar/community.directus.com/ahmad_quvor/32/310_2.png) [@ahmad\_quvor](https://community.directus.com/u/ahmad_quvor)\
**Post date:** [August 20, 2025, 4:49pm UTC](https://community.directus.com/t/granular-access-to-files-depending-on-other-collections/1010/2 "2025-08-20T16:49:48Z")

</div>

Hello,

In the `projects` collection if you use the `files` interface which will create a junction table and a field in the `directus_files` your problem will be solved.
