Skip to content

Admin Sub menu items still visible when not permitted #2228

@wgstjf

Description

@wgstjf

Hi there,

I have an issue where the sub-menu items still appear in the admin menu even when that user's permissions do not allow them to view/edit that section. Within the Redux options page itself the relevant sections, correctly, do not appear so the permissions variable is setup correctly (I believe) but it seems that the Admin menu is ignoring them.

The tech specs are:

WP Version: Version 4.1.1
Redux Version: v3.5.2.1
Dev_mode: no
Embedded rather than plugin.

The relevant bit of code being used is:

/* Responsive Settings */

    $this->sections[] = array(
        'icon' => ' el-resize-small',
        'icon_class' => 'el',
        'title' => __('Responsive Settings', INDIGO_THEME_NAME),
        'permissions' => 'manage_options',
        'fields' => array(

            array(
                'id' => 'responsive-menu-custom',
                'type' => 'switch',
                'title' => __('Custom Menu for small devices', INDIGO_THEME_NAME),
                'sub_desc' => __('Do you want to have a custom menu for smaller devices', INDIGO_THEME_NAME),
                'desc' => __('', INDIGO_THEME_NAME),
                'switch' => true,
                'std' => '0'
            ),

The following is a screenshot when logged in as an editor (who by definition should not be able to see the 'Responsive Settings' (and the previous two sub menu items).

image

The support url is: http://support.redux.io/?id=xvMAFOivkd4l941hd81l%2FPrpBADutuv%2FxT3Ao9ZDz3yQRHUibmEebKXPmCbNz8pyDNVnSXW2sfUIrVveMFs5rg%3D%3D

Thanks in advance,

Will

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions