Skip Navigation

[Closed] Wysiwyg upload media doesn't work for custom user role

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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

This topic contains 3 replies, has 2 voices.

Last updated by Christopher Amirian 1 year, 11 months ago.

Assisted by: Christopher Amirian.

Author
Posts
#2498401

Dear supporters,

we are facing problems uploading media files from wysiwyg field.

SCENARIO:
• we have a custom user role managed by Access.
• Upload_files capability ON.
• We have a Form with repeatable field group where the wysiwyg is placed.
• We are aware about errata https://toolset.com/errata/access-setting-to-limit-media-library-to-own-media-doesnt-work-with-add-media-button-of-wysiwyg-editor/
• with admin user the upload media button works as expected
• the error message says you don't have permission to attach files to this post
• adding edit_posts capability resolve the problem, but is it safe? our users with this custom user role must not be able to edit nothing on backend and also they must be able to only manage their own contents.

can you please investigate?
thanks for best support ever

#2500151

Christopher Amirian
Supporter

Languages: English (English )

Hi there,

I did not understand what is the issue in the first place. It does not allow you to add media to the WYSIWYG.

If that is the issue, then it is expected. If you do not have the capability to edit the post you can not add a post or edit it in the form in the first place.

But if it is something else I'd appreciate it if you can give more context about the issue.

Also, test out without the Access plugin. What happens with other basic WordPress users such as editor or subscriber?

If you are talking about the errata there is no solution at the moment for that.

#2504049

Dear Chris,
thank you for your kind reply.

the core of the issue is this one:
adding edit_posts capability resolve the problem, but is it safe? our users with this custom user role must not be able to edit nothing on backend and also they must be able to only manage their own contents.

The question is: does custom user role we create with access have the ability to manage contents except the one they create if we turn on the edit_posts capability?

Our users MUST be able to manage only the contents they created and they MUST be able to only create and manage certain custom post types.
In Example user A can create and manage Gyms but he can't manage simple wordpress posts or pages or anithing else.

We are scared about activating edit_posts capability because we fear they may publish something else.

#2504407

Christopher Amirian
Supporter

Languages: English (English )

Hi there,

I did not test that, but would you please first, make sure that you restrict the user in question to only posts that he or she created using the steps below?

https://toolset.com/course-lesson/restricting-access-to-pages/

Then add the edit_post capability and login with that user type and test and see if it works as you wish.

Thank you.

The topic ‘[Closed] Wysiwyg upload media doesn't work for custom user role’ is closed to new replies.