Restrict User Access/View based on Doc Status

Hi,
Is it possible to restrict a user from viewing a document based on the document status? For example, if i want to restrict certain users from viewing cancelled document.

Thanks & Regards,

is there any default feature “no idea”
is there any way around “yes”
let me tell you,
for example
first create a single type doctype “salary slip status”
give two documents “submitted” “cancelled”

in actual doctype “salary slip” create a custom field as link field with salary slip status
now write custom script like when the document is cancelled the filed value should be updated as cancelled.

in user permission give the permission for the allow filed choose salary slip status and in value give submitted.

thats all,

idea behind it is simple if the user didnt have permmison for tthe spectific document in the system, he cant even view the document which has even its single value. note the name of the document is also a value so only the admin have the rights to view all.

you can use permission query condition like below. this implementation is by custom app via hooks, it is also possible via server script without custom app.

refer to more details check this( it is in Chinese)

Just one note, the permission query only limits the list view. Users will still be able to view the document if they manage to get there directly.