How to setup User permission for a particular File folder

Hello Everyone,

I have created a role called “File Manager”, and have assigned this role to 5 users with permissions.

I have created a folder in File Doctype as “Sales Documents”.

As seen in the above image, there is also a folder called “Attachments”.

Can anyone help me on how to give access to 5 users only for the Sales Documents Folder.

I had tried with User Permission setup, but still this doesn’t seems to work.

We are using,

ERPNext: v11.1.39 (master)

Frappe Framework: v11.1.36 (master)

Thanks & Regards,

You can use permission query for that.


Could you please elaborate this.


permission_query_conditions = {
“Doctype Name”: “”,

in .py file:
def get_permission_query_conditions(user):
if not user:
user = frappe.session.user
if “System Manager” in frappe.get_roles(user):
return None
elif “role” in frappe.get_roles(user):
l = (“”" ‘tabTable Name’.owner= ‘%s’ “”" % (user))
return l

No we have only this way or maybe developers do something new in User Permissions?
If not can you give more information where should I insert your code? I am newby in that, hope for understanding.