• Resolved fneumeier

    (@fneumeier)


    Hi,

    since the recent update to version 2.3.17, I can’t log in to WordPress with a user role other than administrator. All other user roles (like editor) trying to log in get the error message “You do not have sufficient permissions to access this page.”
    The issue disappears, when I disable the Responsive Gallery Grid plug-in and reappears as soon as I reactivate it.

    Thanks for fixing this bug quickly. Kind regards
    Franz

Viewing 5 replies - 1 through 5 (of 5 total)
  • I’ve got the same problem

    I had the same problem. See https://www.ads-software.com/support/topic/latest-update-breaks-all-public-ajax-calls/ for the reason and a quick fix, it’s the same issue.

    Thread Starter fneumeier

    (@fneumeier)

    Thanks a lot, @jonasbreuer – This saved my day ??

    Since version 2.3.16, developper added a security check based on the “manage_options” capability into the file “rgg-options.php”.
    Because of this, users that doesn’t have this capability (all but administrators) may encounter the message “You do not have sufficient permissions to access this page.”

    From version 2.3.16, for best practice the developper should implement a “Role Management” section into the RGG settings panel, and accordingly adapt the security check added in “rgg-options.php” (since version 2.3.16).

    Here is a Fix in case your users face “You do not have sufficient permissions to access this page.” in the WordPress Dashboard.

    1. Find the WordPress capability that is common to the different users who must access to the WordPress Dashboard.
      eg: “manage_woocommerce” if users have the “Shop Manager” role
      eg: “edit_page” if users have the “Editor” role
      eg: “read” if users have the “Subscriber” role
    2. Add the code below into the functions.php file of your child theme
      (replace the below bold capability with the one depending your case)
    remove_action('admin_init', 'rgg_admin_init');

    add_action('admin_init', 'FIX_rgg_admin_init');
    function FIX_rgg_admin_init(){
    if (!current_user_can('manage_woocommerce')) {
    wp_die('You do not have sufficient permissions to access this page.');
    }
    register_setting( RGG_OPTIONS, RGG_OPTIONS, 'rgg_options_sanitize' );
    add_settings_section('rgg_main', 'Main Settings', 'rgg_section_text', RGG_PLUGIN);
    add_settings_field('rgg_text_string', 'Plugin Text Input', 'rgg_setting_string', RGG_PLUGIN, 'rgg_main');
    }
    Plugin Author Jules Colle

    (@jules-colle)

    Sorry about this. The issue should be fixed in version 2.3.18

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