So now, there will be a separate user permission record for every applicable doctype (unless Apply to all Document Types is checked).
This will enable a contextual user permission system
i.e., User can define what docs(in link fields) should be allowed under a specific parent doctype.
This structure will be much more clear to understand and will also be import friendly.
how about this new refactor proposal? or how the different use cases works in your design? any possibility we work together and come out a ultimate solution for all identified use cases?