Hi Christian, thanks for the update and asking DOC Team to put something online for us to chew.
Just to be clear, Toolset Forms checks
current_user_can( 'edit_post', $related_item_one );
That would intuitively mean, that it requires EDIT permissions for both posts on both ends of the relationship (be it M2M or not).
However, it is NOT enough to give EDIT Permissions (be it edit own or edit others) in Toolset Access for those post types. We have to give it PUBLISH permissions.
So while I kind of can live with Toolset Forms asking for EDIT Permissions, I kinda have a hard time believing that PUBLISH rights should somehow influence EDIT Rights.
Of course, if we give Publish rights we automatically give edit rights, but that does not mean, that giving Edit rights does not give such edit rights 🙂
And clearly that is what happens. Even if Access sets EDIT (own or others) for this post type, this does not satisfy Toolset Forms Check for
current_user_can( 'edit_post', $related_item_one );
I have not dug deeper why this is, but if things where "right" then at least, giving "Edit own" access rights, and then attempting to disconnect two (own) related posts, should work, but it does not. Only after Publish rights are set, it does.
And here it gets real confusing, because assume you attempt to disconnect a post that is yours, connected with one that isn't yours
Well, those publish rights now are not enough anymore. Now you need publish rights AND edit others.
Thus there is some mess here, I presume in Access, rather than in Forms.
I have submitted a feature request for the actual best solution to this problem, which is to simply listen only to a custom cap.
However, not sure how many sites already use the "Works! My issue is resolved" solution of mixing some access rights arbitrarily until some mix works... and changing that, might break some setups.
Can you confirm that you also need to set Publish rights (instead of edit rights as expected) in Access to make it work?
And that would be a bug, right? We expect edit rights, not publish.