• Resolved sarahsas

    (@sarahsas)


    Hello. Last week a user with “editor” permissions could see and edit the Video Galleries and posts. Now when I log in as an editor, the menu item is gone. Have permissions changed recently? Is this a setting a can adjust? I need editors to be able to video and edit videos on this particular site.

    Please advise?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor wpvideogallery

    (@wpvideogallery)

    Thank you for reaching out — and sincere apologies for the unexpected change in behavior.

    Starting from a recent update, we implemented a security hardening change based on feedback from a security researcher (Mohamad Nour Almujarkesh). You can find the relevant note in the “Security Hardening” section of our changelog.

    What Changed?

    Previously, users with the Editor role could access and manage video posts. However, because the Editor role includes the unfiltered_html capability (which can introduce potential security risks), we have now disabled backend access to video content for editors by default.

    How to Restore Editor Access

    If you trust your editors and would like to re-enable their access, you can do so programmatically by adding the following code to your theme’s functions.php file:

    function override_aiovg_videos_post_type_args( $args, $post_type ) {
    if ( ! current_user_can( 'manage_aiovg_options' ) ) { // Not an admin
    if ( current_user_can( 'editor' ) ) {
    $args['show_in_menu'] = true;
    $args['menu_position'] = 5;
    $args['menu_icon'] = 'dashicons-playlist-video';
    }
    }

    return $args;
    }

    add_filter( 'register_post_type_args', 'override_aiovg_videos_post_type_args', 11, 2 );

    This will ensure that Editors can once again see and edit video posts from the admin dashboard.

    Hope this solved your issue!

    Thread Starter sarahsas

    (@sarahsas)

    hi @wpvideogallery thanks for the explanation and the custom code. I have tested your code snippet and while yes, it does re-enable editor permissions, it also seems to randomly enable other unexpected admin menu items? See screenshots for reference, this is very strange.

    This is what the admin dashboard looks like before I add your snippet:
    https://imgur.com/hsfUqL2

    And after I add your code snippet, I get a whole bunch of unexpected menu items in addition to the Video Gallery?
    https://imgur.com/A7wXfxJ

    I also notice that it changes the dashicon for the DOWNLOADS menu item as well…

    Any idea why this would happen?

    • This reply was modified 3 months, 3 weeks ago by sarahsas.
    Plugin Contributor wpvideogallery

    (@wpvideogallery)

    Aah. Sorry about that. Kindly try using the updated code below:

    function override_aiovg_videos_post_type_args( $args, $post_type ) {
    if ( 'aiovg_videos' !== $post_type ) {
    return $args;
    }

    if ( ! current_user_can( 'manage_aiovg_options' ) ) { // Not an admin
    if ( current_user_can( 'editor' ) ) {
    $args['show_in_menu'] = true;
    $args['menu_position'] = 5;
    $args['menu_icon'] = 'dashicons-playlist-video';
    }
    }

    return $args;
    }

    add_filter( 'register_post_type_args', 'override_aiovg_videos_post_type_args', 11, 2 );
    Thread Starter sarahsas

    (@sarahsas)

    Wonderful @wpvideogallery that new version did the trick. Thank you!

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

The topic ‘Editor Permissions?’ is closed to new replies.