WordPress.org

Ready to get started?Download WordPress

Forums

User Role Editor
Media Library Permissions (7 posts)

  1. blackessej
    Member
    Posted 3 years ago #

    For the life of me, I can't figure this out. Plugin's installed, and I just want the editor to be able to upload, view, delete, etc. items from the media library. I have upload_files checked...what am I missing?

    http://wordpress.org/extend/plugins/user-role-editor/

  2. Vladimir Garagulya
    Member
    Plugin Author

    Posted 3 years ago #

    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?

  3. blackessej
    Member
    Posted 3 years ago #

    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.

  4. coume01
    Member
    Posted 3 years ago #

    I have the same problem.

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

  5. bgunsberger
    Member
    Posted 3 years ago #

    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.

    Thanks.

  6. Mr. Anson
    Member
    Posted 3 years ago #

    Hi,

    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 ?
    thanks.

  7. Zeb
    Member
    Posted 3 years ago #

    @ 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' );

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic