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 may encounter the message “You do not have sufficient permissions to access this page.”
From version 2.3.16, 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 you faces “You do not have sufficient permissions to access this page.”
- Find the WordPress capability that is common to the different users who must access to Responsive Gallery Grid, and/or should not get the error message.
eg: “manage_woocommerce” if users have the “Shop Manager” role
eg: “edit_page” if users have the “Editor” role
- Add the code below into the functions.php file of your child theme
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');
}