We created a CRED form that allows Subscribers to update pages from the front end including uploading/attaching an image using the "Add Media" button. The problem we are facing is that the "uploading of the image part" only works when the user role is "Editor" or "Administrator". With any other role, we get the error message: "Sorry, you are not allowed to attach files to post."
We used the "User Role Editor" Plugin to create a new role cloned after the "Subscriber" role and called it "Superuser" and we added the necessary permissions like edit_posts, edit_others_posts, edit_pages, edit_others_pages, publich_posts, publish_pages, edit_published_apge, edit_published_posts. We even gave this new role the same deprecated levels as the editor role like level_0 thru level_7. And it still does not work.
See Attached Screenshots.
It looks like you already have a similar issue reported in:
https://toolset.com/forums/topic/you-dont-have-permission-to-attach-files-to-this-post-wysiwyg-media-button/#post-385731
We appreciate your assistance in this matter.
Thank you.
I resolved the above issue by using "Access Control" and giving the user role access to "Publish", "Edit own" and "Edit any" to Pages which is the post type that the CRED form is modifying.
Thanks