Include post id[s] into WP_Query()
I think you should be able to do this with the user_has_cap filter. Because that filter passes through the post ID in the $args for the edit_post capability, you can use that to check if the current user has been artificially given this capability – and if so, force the edit_post capability to be true … Read more