Help with DMS permissions for task and project

Hey there, I am using the following permissions that already come with axelor. So far it works properly wherein a user can only read or write as needed depending on the set permissions on the folders.

Now my concern is when it comes to attachments to tasks and projects. I would have to set the permissions(permissions in DMS) beforehand for the basic users to be able to post attachments in a task or project. Seeing how regularly tasks are created and are closed, setting permissions for each one tends to be tedious.

How should I set the user permissions for the users to be able to post and view their files automatically in a task or project while still retaining original dms permissions? I dont want them to receive access to all documents such as the financial reports generated in the project module.

These are the user permissions set so far in my instance.


Condition: self.id = ANY(SELECT x.id FROM DMSFile x LEFT JOIN x.permissions x_permissions LEFT JOIN x_permissions.user x_permissions_user LEFT JOIN x_permissions.group x_permissions_group LEFT JOIN x_permissions.permission x_permissions_permission WHERE (x_permissions_user = ? OR x_permissions_group = ?) AND x_permissions_permission.canCreate = true)


Condition: self.id = ANY(SELECT x.id FROM DMSFile x LEFT JOIN x.permissions x_permissions LEFT JOIN x_permissions.user x_permissions_user LEFT JOIN x_permissions.group x_permissions_group LEFT JOIN x_permissions.permission x_permissions_permission WHERE (x_permissions_user = ? OR x_permissions_group = ?) AND x_permissions_permission.canRead = true)


Condition: self.id = ANY(SELECT x.id FROM DMSFile x LEFT JOIN x.permissions x_permissions LEFT JOIN x_permissions.user x_permissions_user LEFT JOIN x_permissions.group x_permissions_group LEFT JOIN x_permissions.permission x_permissions_permission WHERE (x_permissions_user = ? OR x_permissions_group = ?) AND x_permissions_permission.canWrite = true)