Show only documents with certian field value

Hi,

is there any way to restrict some users to see only documents which has field X set to value Y?
I have custom doctype and I want to restrict few users to see only docs.

@Pararera

This can be achieved if you do not allow those users for particular doctypes at all But only those documents having field X set to Value Y can be shared one by one with particular user by working with Share With option within Side Bar where you can also control user to either write, read and other actions he can perform with subject document only.

1 Like

This seems like a manual solution. Is there any automated solution?

Docs are created via server script.

It seems to me you should be able to accomplish this via user permission docType.

1 Like

You could also use a has_permission hook to filter everything at a system level if you’d like.

1 Like

This helped. I did not understand how it worked.

Thanks.