Support » Plugin: User Role Editor » Media editing permissions

  • Hi,

    Great plugin, it does a wonderful job!

    I have customized user capabilities to allow access to only woocommerce related options and sections.

    I also allowed those users to be able to upload images (upload_files capability). However, the users are not able to edit alt titles of the images. Which capability is responsible for that?

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • I found this topic: https://wordpress.org/support/topic/allow-new-role-to-edit-uploaded-media-data/

    Is the pro version still the only solution to this?

    Plugin Author Vladimir Garagulia

    (@shinephp)

    At the post you found there is a link to the related discussion between WordPress developers started 7 years ago. Unfortunately the ticket still does not have a final solution. You may try a hack offered there:

    
    add_action( 'admin_init', function() {
        add_filter( 'register_post_type_args', function( $args, $post_type ) {
            if ( 'attachment' === $post_type ) {
                $args['capabilities']['edit_posts']   = 'upload_files';
                $args['capabilities']['upload_files'] = 'upload_files';
            }
            return $args;
        }, 10, 2 );
    } );
    

    or try User Role Editor Pro options:
    1) grant to a role edit_posts, edit_others_posts, but block ‘Post’ menu for it with “Admin menu access” add-on;
    or
    2) force all custom post types use there own capabilities set.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.