• Resolved linushallstrom

    (@linushallstrom)


    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.

    https://wordpress.org/plugins/asgaros-forum/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Asgaros

    (@asgaros)

    Hello linushallstrom,

    the name of the capability is upload_files. Can you please try it again with the correct definition?

    Thread Starter linushallstrom

    (@linushallstrom)

    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.jpg

    Thread Starter linushallstrom

    (@linushallstrom)

    The problem only occurs on the forum.
    Adding images to events and blog posts works fine.

    Plugin Author Asgaros

    (@asgaros)

    I will check this problem, thanks for your feedback. 🙂

    Plugin Author Asgaros

    (@asgaros)

    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. 🙂

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Image upload Permission’ is closed to new replies.