• This is a coding question …for the developer.
    I have created a new “SuperUser” role. (it is a user-defined role …different from the “Super User” that exists only in wp multisite). This new role has all the same default privileges as “administrator” but it is a separate and distinct role from “administrator” (On the sites I manage, some capabilities are removed from the “administrator” role).

    THE PROBLEM:
    The call to add_submenu_page() in iqblockcountry_create_menu() expects a capability for the 4th argument but a role is being passed instead (“administrator”). This works for most users but it doesn’t work for my “SuperAdmin” user role so the result is that the IQ Block Country settings menu does not show in the dashboard for this role, which is intended to be higher than “administrator” role.

    THE QUESTION:
    Can you recommend a workaround that doesn’t involve changing a plugin file so that I would be able to update IQ Block Country to a new version without “breaking” the ability to see the IQ Block Country settings page? Thank you.

    • This topic was modified 4 years, 4 months ago by patrick_here.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Pascal

    (@iqpascal)

    Does the SuperUser role have the “Super Admin” capabilities?

    Thread Starter patrick_here

    (@patrick_here)

    No, true “Super Admin” role exists only on WP Multisite and this is not a WP Multisite. This SuperAdmin role that I am creating via a call to add_role() is really just an alias for “Administrator” but the normal “Administrator” has certain capabilities withheld. For example, the capability of switching the theme is withdrawn from all users with “Administrator” role.

    (Apologies for the confusion of terminology in my first post where I used both SuperAdmin and SuperUser. I’m calling the new role “SuperAdmin” but it has nothing to do with the “SuperAdmin” that exists only on WP Multisite)

    • This reply was modified 4 years, 3 months ago by patrick_here.
    Thread Starter patrick_here

    (@patrick_here)

    Okay, I’ve come to the realization that it’s my code that needs to change because it’s not just IQ Block Country that checks the role (ie ‘administrator’ ) rather than capabilities (other plugins do it too). So I’m going to create a new “AdminEditor” role and remove the capabilities from that role rather than removing them from “Administrator”.

    Thanks for the great plugin Pascal!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘User-defined role cant see settings menu’ is closed to new replies.