Support » Plugin: User Role Editor » [Plugin: User Role Editor] Media Library Permissions

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Vladimir Garagulia


    You selected a valid capability for your purpose. WordPress checks it in the menu.php to show/hide the ‘Media’ menu in the admin dashboard.
    I have a question. You wrote about editor. WordPress built-it role ‘Editor’ has that capability by default. And user with role ‘Editor’ can work with Media library. What is wrong in your case?

    The problem I’m having is the editor account can add new media and view media in the library, but they cannot edit or delete media. I’d like the editor account to have those options.

    I have the same problem.

    I just noticed that a plugin bij the name CAPA is blocking this.

    I’m having a related problem with ‘editor’ roles. Editors have permissions to delete all files except ones they have uploaded themselves. This happens even with the plugin disabled so I don’t know what’s going wrong.



    I need this function: when user edit article, he can use media library to insert image, but only the image he upload it (he can’t use image that upload by other user)

    how could I implement it ?

    @ sonic119

    Use the following snippet in your function.php instead. It will restrict users to view only media library items they upload. They will still see the total number of files that are uploaded but will not be able to view them even if they type in the attachment_id.

    function my_files_only( $wp_query ) {
        if ( strpos( $_SERVER[ 'REQUEST_URI' ], '/wp-admin/upload.php' ) !== false ) {
            if ( !current_user_can( 'level_5' ) ) {
                global $current_user;
                $wp_query->set( 'author', $current_user->id );
    add_filter('parse_query', 'my_files_only' );
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Plugin: User Role Editor] Media Library Permissions’ is closed to new replies.