Skip Navigation

[Resolved] Grant access to other user to add / edit content

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 - - 9:00 – 13:00
14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 - - 14:00 – 18:00

Supporter timezone: Africa/Casablanca (GMT+01:00)

This topic contains 1 reply, has 2 voices.

Last updated by Jamal 1 year, 9 months ago.

Assigned support staff: Jamal.

Author
Posts
#1934441

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

#1936081

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

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.