Tell us what you are trying to do?
I want to create a business directory website where a user can create a "business profile" and grant other user to add content (relationship) such as product or service to that business
Basically :
Business Profile
- Product
- Service
- Job Listing
- Article
User A created business profile and can grant user B,C,D to create or edit a new product/service/job listing/article and relate it to the business profile that user A has created
Is there any documentation that you are following?
no
Is there a similar example that we can see?
no
What is the link to your site?
hidden link
Hello and thank you for contacting the Toolset support.
Toolset nor WordPress can provide such restrictions out of the box. Please check this article about WordPress permissions and roles https://wordpress.org/support/article/roles-and-capabilities/
Basically, permissions in WordPress are site-wide, they can't be bound to a specific post(business profile).
But, I think that you can come up with a custom code that will check if the user is allowed to create a post and associate it with the a business profile. You can create a custom shortcode or a function and register it in Toolset settings to be used inside conditional blocks or shortcode. Then you can put the forms to create these posts inside these conditionals. Check the following articles:
- https://toolset.com/course-lesson/using-toolset-conditional-block/
- https://toolset.com/documentation/programmer-reference/views/using-custom-functions-in-conditions/
- https://toolset.com/documentation/adding-custom-code/how-to-create-a-custom-shortcode/
You can put these conditions and forms in the business profile content template, this can be useful if you created One-to-many relationships from the business profile to the other post types(Product, Service, Job Listing, Article) so the parent post(business profile) is preselected automatically. https://toolset.com/course-lesson/selecting-parent-posts-when-using-forms-to-create-child-items/
I hope this helps. Let me know if you have any questions.