WordPress.org

Forums

ACL specifically for plugins (2 posts)

  1. cballou
    Member
    Posted 4 years ago #

    With WordPress 3.x came an increasing number of websites supporting multiple authors and contributors. The current problem I see is that you cannot restrict user access to particular installed plugins. Say, for instance, I want to grant a contributor access to create a post but not publish. By default, since next to ZERO plugins implement any form of access control, the contributor has full access to any plugins that modify the add post page.

    This poses a substantial problem for blog admins looking to support multiple authors that have legacy plugins installed.

    Since wordpress already controls active and inactive plugins, there is clearly a database identifier for each plugin. Simply use this identifier to create another table of role based permissions.

    My proposal is to create a sub-page or addon of the plugins page to multi-select roles to give admin access to each of the plugins. This would thereby control not firing the add_action('init') method for the given plugin when is_admin() is true.

    I created proof of concept code for plugin developers that more or less gets my point across. You can view the example code here:

    Adding Role Based User Access Controls to your WordPress Plugin

    Unfortunately, it should not be this hard to add access control to plugins as the feature should be baked into WordPress. You guys need to suck it up and admit that the 3+ years of ACL requests actually mean something is missing.

    I'll build this into core for you if you want.

  2. James Huff
    Volunteer Moderator
    Posted 4 years ago #

    I'll build this into core for you if you want.

    WordPress is developed by volunteers, so you're more than welcome to contribute anything that you feel would be useful:

    http://codex.wordpress.org/Contributing_to_WordPress#WordPress_Development

Topic Closed

This topic has been closed to new replies.

About this Topic