WordPress.org

Forums

Admin Menu Editor
Required Capability Not Working (5 posts)

  1. glenmallard
    Member
    Posted 11 months ago #

    I love this plugin, thank you!!

    I've created four new users on my website who would like to contribute to my blog. The role I have set for each of them is Contributor and when I login to the dashboard with any of these four users, this is what I see:

    Dashboard
    Posts
    Banner Builder
    Edge Slideshow
    Flex Slider
    iCarousel
    Jetpack
    Comments
    Tools
    Portfolios
    News
    FAQ
    Employees
    Pricing Tables
    Clients
    Testimonials
    Profile

    All I want them to see is Dashboard, Posts, and Profile and I recently read that Admin Menu Editor can handle this. However, I think I found a bug in the plugin.

    In order to hide everything besides those three, I've set everything besides Dashboard, Posts, and Profile to have a Required Capability of Administrator. After hitting Save Changes as the admin, if I login as one of the four Contributors, the long list above is still present. Admin Menu Editor isn't working to hide anything from my Contributors...?

    Am I doing something wrong here?

    Thanks!

    https://wordpress.org/plugins/admin-menu-editor/

  2. Janis Elsts
    Member
    Plugin Author

    Posted 11 months ago #

    Did you change the required capability for all menu items that you want to hide, or only the top level menus?

    The way that WordPress handles admin menu permissions can sometimes be counter-intuitive: a top level menu will stay visible as long as it has at least one accessible submenu item. For example, if you change the required capability for "Tools" but not "Tools -> Available Tools", the "Tools" menu will actually remain visible.

    To completely hide a menu, you'll need to change the capability for its submenus as well.

  3. glenmallard
    Member
    Posted 11 months ago #

    Thank you for such a quick response Janis! I only changed the required capability for top levels and didn't think to change the sub levels as well. Worked like a charm!

    In the midst of trying to figure this out yesterday, I tested nearly 10 plugins and found ONE of them worked particularly well - Advanced Access Manager (Adminimize came in second but was far too lengthy). Being that that I plan on using Admin Menu Editor on all of my sites bc of it's primary functionality, I have removed Advanced Access Manager and will use your plugin for required-capability functionality as well (two amazing features in one plugin!).

    Might I suggest adding some kind of bulk editing functionality similar to how AAM handles it? By doing so, I think it would be a little more clear that your plugin does much more than simply organize the WP menu.

    For example: Maybe you could remove the required capability dropdown in the current blue columns, and create a third column in red with "Required Capability" as the title. In this column, you could allow the parent to control all sub items by checking a box (Similar to how Adminimize handles it) and selecting the capability exactly like you currently have it? I'm sure you can come up with something better than that but it's worth mentioning. :)

    Thanks again for the quick response time. I just gave the plugin 5 stars which is well deserved.

    Cheers!!

  4. Janis Elsts
    Member
    Plugin Author

    Posted 11 months ago #

    For example: Maybe you could remove the required capability dropdown in the current blue columns, and create a third column in red with "Required Capability" as the title. In this column, you could allow the parent to control all sub items by checking a box (Similar to how Adminimize handles it) and selecting the capability exactly like you currently have it? I'm sure you can come up with something better than that but it's worth mentioning. :)

    The Pro version has something similar to that. It has a list of roles at the top and a checkbox next to each menu. You can click a role to select it and then simply un-check the menu items that you want to hide from that role. Un-checking a top level menu automatically un-checks its submenus.

    (The capability settings are still present in the Pro version, but usually you don't need to touch them.)

  5. glenmallard
    Member
    Posted 11 months ago #

    Looks like you already have this sorted out... Once again, I greatly appreciate you creating such a wonderful plugin!

    Cheers!

Reply

You must log in to post.

About this Plugin

  • Admin Menu Editor
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic