I have Team CPT, Project CPT, and CPT supplier. The relationship between Team and Project is many to many, project and team many to many
I want to achieve project workspace privacy funtionality in terms that when user access to a project CPT page can see it only if is part of any team related to the project.
Membership Role: This is not a solution, because if I assign an editor capable to read CPT Project could read all other projects that do not belong to him
Group WordPress Plugins: They create separated groups not related to CPT or let you assign as taxonomy field to a CTP as a group, but is the same issue as Membership Role, could read all project that does not belong
Toolset conditionals: I could set up a condition as the main block in the CPT template but I can't find a way conditions can be related to CPT relationships like the following
View loop Project-Teams
View Loop Tems-Supplier (nested)
current user.id = supplier.author.id
Main block with all page content
Point 2
I have Project CPT, Task CPT, and Section CPT. Tasks and Section are related many to many
I want to show in the project
Section
Task
But I can't find a solution because nested views are not supported
Could you please help to find a solution for those 2 points?
You are right that the solution would need to use conditional display, a role-based solution or similar could not work.
But there is no way that you can add such complex conditions using the UI. You can use custom functions in conditions, and that's the route you'll need to go down.
Write a PHP function that gets the related teams for the current post, and checks if the author of those teams matches the current user id.
You have to register the custom function for use in conditionals at Toolset > Settings > Front-end Content.
As for the second question, I take it Sections are related to Projects? So you can show Sections belonging to a Project easily enough, and—yes—you need nested View to display the Tasks belonging to each Section.
Support for nested Views should be coming later this year, but in the meantime you need to use the legacy Views interface to use nested Views. Are you familiar with that at all?