User Permissions to Linked Doctypes

Hi there.

I have a few doctypes linked with each other, all of them are custom doctypes.

Example:

I am giving a user permission to a particular company to a user. Only that specific company and the data shows up in the Companies and Projects doctype. (Projects doctype is directly linked with Companies)

But when that user goes into Buildings doctype list, all the other Buildings of other Projects of non-permitted companies are showing up in the list. That is, the user permission of Companies is not being applied to the grandchild doctype, which is indirectly linked to Companies through Projects.

How can I achieve this? I want to only give one doctype’s user permission and expect all the linked doctypes, direct or indirect, will only show data relevant to that original permission.

Let me know if I am not clear enough.

Thanks.

Maybe just pull in the company field in the building doctype via ‘fetch from’ from the project field?

Try hide desendents check box in user permissions

Hi @michelle .

I know this can work. But my linked doctypes are too many. So I wanted to try some other solution which won’t involve “fetch from” or adding company doctype link in all my other doctypes.

Thanks.

This won’t work as this only applies to the doctypes which are Tree type.

And also, this property does not apply to linked doctypes as in my case. I have tried this way.

Any other ideas, @Abdul_Samad ?

Thanks.