WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] My plugin only allows admin access...Can I create a super-administrator? (12 posts)

  1. Jackie
    Member
    Posted 1 year ago #

    I want to give access to an editor to one of my plugins, but only administrators are allowed access...I don't want to have the same rights, but higher rights than the administrator (for security purposes).

    Is there a way to create a super-administrator?
    Is there a way to restrict another admin, access to the other plugins / posts / pages?

    Thanks

  2. catacaustic
    Member
    Posted 1 year ago #

    Super-administrators are only set up/available in a multi-site installation. In a normal install Administrator is the highest level that there is.

    Having said that, you can set up your own roles and permissions, so you might want to do that - http://codex.wordpress.org/Function_Reference/add_role

  3. Jackie
    Member
    Posted 1 year ago #

    Thank you. May I ask you how would I apply this to a specific plugin?

    'edit_posts' => true,
    'delete_posts' => false, // Use false to explicitly deny

    would it be something like:
    'edit_pluginXYZ' => true,
    'delete_pluginXYZ' => false, // Use false to explicitly deny

    Regards

  4. catacaustic
    Member
    Posted 1 year ago #

    That part is not set up in that bit of code. You would need to do your own checks in your plugin to see if the current uesr has the access rights that you want to set up. If they do you can allow that action, and if not, don't allow it.

  5. Jackie
    Member
    Posted 1 year ago #

    The developer says that only admins are allowed to use the plugin. But that is a problem because I would have to make my client an administrator (same level rights as me...yikes!)

  6. catacaustic
    Member
    Posted 1 year ago #

    Ahh..... If it's not a plugin that you wrote yourself, then it's going to be a whole lot harder to do.

    Can I ask why you're worried about yoru client having access to that plugin?

  7. Jackie
    Member
    Posted 1 year ago #

    Actually I want him to access that plugin, but he can have access only if he is an admin. I just don't want him to have admin access to the rest of the site because then he would have the exact same rights as me. He does not own the site, he just rents it.

  8. catacaustic
    Member
    Posted 1 year ago #

    Well, unless the plugins developer can make the changes for you (possilbe, but most developers are unlikely to change something like that for one person) then you'll either have to let them have administrator access, or you'll have to do whatever it is that plugin does for them.

  9. Jackie
    Member
    Posted 1 year ago #

    When I search WordPress roles, it gives me the option of Super Administrator for multi sites. Since I do have multi sites...would setting it up as a Super Administrator give me more rights than an Administrator?

  10. catacaustic
    Member
    Posted 1 year ago #

    Since you're running a multi site, then you should already be a super-administrator.

    BUT that doesn't solve the problem because the plugin is only set to need administrator access to be able to use it. What I said above still stands.

  11. Jackie
    Member
    Posted 1 year ago #

    Thank you so much for your feedback

  12. Jackie
    Member
    Posted 1 year ago #

    FYI. I found this plugin "User Role Editor" that accomplishes exactly what I was trying to do.

Topic Closed

This topic has been closed to new replies.

About this Topic