Hi @Tennis,
What you're looking for is Object Level Security that's tracked here. It's not yet implemented, but it's on the roadmap.
For now your best option would be to create D1 and D2 in a Space1 and D3 and D4 in a Space2. Then create two different roles one of which would give correct space level privileges for the Space1 and the other one for the Space2. After that just assign different roles to different users.
You can read more info here and here.
Best,
Oleg