Image upload Permission
-
I added this function:
function change_editor_settings($settings) { $settings['teeny'] = false; $settings['media_buttons'] = true; return $settings; } add_filter('asgarosforum_filter_editor_settings', 'change_editor_settings');It works when I’m logged in as admin, but not with other users, even though their user role has the upload_file capability.
Trying to add media to a post gives the following error:
You don’t have permission to attach files to this post.
-
Hello linushallstrom,
the name of the capability is upload_files. Can you please try it again with the correct definition?
Sorry, I meant upload_files, that was just a typo.
Here are all the permissions for the user group:
https://s32.postimg.org/owv1cehut/permissions.jpgThe problem only occurs on the forum.
Adding images to events and blog posts works fine.I will check this problem, thanks for your feedback. 🙂
Hello again,
I think this problem occurs because the Media Library is showing all files inside it without taking care which user has uploaded a specific file – so there is no filtering. Thats why only administrators should have access to it. And thats why I am using my own upload-logic at the moment.
Please keep in mind that this little code you provided is only a little “hack” to add the media library to the forum. I will try to improve my existing upload-logic in a future release so that it will work in a more user-friendly way. 🙂
The topic ‘Image upload Permission’ is closed to new replies.