Support » Plugin: User Role Editor » How to give access to author to see Newsletter plugin details

  • Hello,

    I am using User role editor plugin. Admin access role can able to see the Newsletter details in admin panel. But Author role user cannot see the Newsletter details. So how can I add capabilities for Author role to access only Newsletter plugin.

Viewing 1 replies (of 1 total)
  • Plugin Author Vladimir Garagulia



    But ‘Newsletter’ plugin was written in special way: it defines admin menu items with virtual capability ‘exist’ which available to any user.

    It applies permissions before define admin menu items. It’s not friendly to the WordPress user capabilities system. It uses directly WordPress built-in roles: administrator or editor (if it’s allowed at the Newsletter plugin settings).

    Parts of menu is available for the ‘administrator’ role only.

        function is_allowed() {
            return current_user_can('administrator') || $this->options['editor'] == 1 && current_user_can('editor');
        function admin_menu() {
            if (!$this->is_allowed()) return;
            add_menu_page('Newsletter', 'Newsletter', 'exist', 'newsletter_main_index', '', plugins_url('newsletter') . '/images/menu-icon.png', '30.333');
            $this->add_menu_page('index', __('Dashboard', 'newsletter'));
            $this->add_admin_page('info', __('Company info', 'newsletter'));
            if (current_user_can('administrator')) {
                $this->add_menu_page('welcome', __('Welcome', 'newsletter'));
                $this->add_menu_page('main', __('Settings and More', 'newsletter'));
                $this->add_admin_page('smtp', 'SMTP');
                $this->add_admin_page('status', __('Status', 'newsletter'));

    So User Role Editor will not help you with access to this plugin for author role. It would be possible only after direct editing of the code above and other.

Viewing 1 replies (of 1 total)
  • The topic ‘How to give access to author to see Newsletter plugin details’ is closed to new replies.