I am trying to use Views in order to display a section that consists of child posts of the currently displayed post, but I want this section to be visible only if the current logged-in user is the author of the currently displayed parent post. I have tried several approaches, but none of them works. The main drawback is that a user can now see the child posts of a parent of the same type that was created by another user, and this is forbidden in my project.
Example: users: NGO's (create parents - Projects), Volunteers (create children - Signups). I want that an NGO sees only volunteers that have signed-up for their own projects (which I have already achieved without any problem), but in the same time I do not want that NGO X sees the volunteers signed-up for a project authored by NGO Y.
You can use conditional shortcodes to check if the current user is the author of the current post.
So if you have a template for the parent posts where you insert the View of the child posts, you could wrap the shortcode that inserts the child View with the following conditional shortcode:
[wpv-conditional if="( '[wpv-post-author format='meta' meta='ID']' eq '[wpv-user field='ID']' )"]
...only if current user is the post author display this...
[/wpv-conditional]