WordPress.org

Ready to get started?Download WordPress

Forums

Members
Support for capabilites grouping needed when number of capabilities grows (4 posts)

  1. Tony Wips
    Member
    Posted 1 year ago #

    Just added 10 plugins and and the number of capabilities increased to more that 120.
    In this situation, rather common, is very hard to define and manage new roles. And what makes things worst, they are listed alphabetically and not logically.

    I'dd suggest to group them logically providing a group checkbox for each group.
    For the rest, very useful and unique plugin!!!

    An example capabilities list fllows,

    activate_plugins
    add_users
    create_folder
    create_roles
    create_users
    delete
    delete_others_pages
    delete_others_posts
    delete_others_tribe_events
    delete_others_tribe_organizers
    delete_others_tribe_venues
    delete_pages
    delete_plugins
    delete_posts
    delete_private_pages
    delete_private_posts
    delete_private_tribe_events
    delete_private_tribe_organizers
    delete_private_tribe_venues
    delete_published_pages
    delete_published_posts
    delete_published_tribe_events
    delete_published_tribe_organizers
    delete_published_tribe_venues
    delete_roles
    delete_themes
    delete_tribe_event
    delete_tribe_events
    delete_tribe_organizer
    delete_tribe_organizers
    delete_tribe_venue
    delete_tribe_venues
    delete_users
    download
    edit_dashboard
    edit_files
    edit_others_pages
    edit_others_posts
    edit_others_tribe_events
    edit_others_tribe_organizers
    edit_others_tribe_venues
    edit_pages
    edit_plugins
    edit_post_subscriptions
    edit_posts
    edit_private_pages
    edit_private_posts
    edit_private_tribe_events
    edit_private_tribe_organizers
    edit_private_tribe_venues
    edit_published_pages
    edit_published_posts
    edit_published_tribe_events
    edit_published_tribe_organizers
    edit_published_tribe_venues
    edit_roles
    edit_theme_options
    edit_themes
    edit_tribe_event
    edit_tribe_events
    edit_tribe_organizer
    edit_tribe_organizers
    edit_tribe_venue
    edit_tribe_venues
    edit_usergroups
    edit_users
    ef_view_calendar
    ef_view_story_budget
    export
    gravityforms_addon_browser
    gravityforms_create_form
    gravityforms_delete_entries
    gravityforms_delete_forms
    gravityforms_edit_entries
    gravityforms_edit_entry_notes
    gravityforms_edit_forms
    gravityforms_edit_settings
    gravityforms_export_entries
    gravityforms_preview_forms
    gravityforms_uninstall
    gravityforms_view_entries
    gravityforms_view_entry_notes
    gravityforms_view_settings
    gravityforms_view_updates
    import
    install_plugins
    install_themes
    list_roles
    list_users
    manage_categories
    manage_links
    manage_options
    manage_polls
    moderate_comments
    promote_users
    publish_pages
    publish_posts
    publish_tribe_events
    publish_tribe_organizers
    publish_tribe_venues
    read
    read_private_pages
    read_private_posts
    read_private_tribe_events
    read_private_tribe_organizers
    read_private_tribe_venues
    read_tribe_event
    read_tribe_organizer
    read_tribe_venue
    remove_users
    rename
    restrict_content
    share
    si_read_profile
    switch_themes
    unfiltered_html
    unfiltered_upload
    update_core
    update_plugins
    update_themes
    upload_files

    http://wordpress.org/extend/plugins/members/

  2. Justin Tadlock
    Member
    Plugin Author

    Posted 1 year ago #

    I've thought about this before. The biggest problem with "logical" grouping is how to handle all the non-WordPress capabilities. It's pretty much impossible for the plugin to know how to group these, unless it simply grouped all of these non-WP caps into their own group.

    The plugin could do some stuff with custom post type and taxonomy capabilities, but that's all the custom data the plugin could really grab.

    I'm all ears for the best ways to handle this though. Feel free to throw ideas out there.

  3. Tony Wips
    Member
    Posted 1 year ago #

    I've prepared a spreadsheet with a basic idea on how arrange capabilities grouping for a single site installation (could prepare for multi site also if you're interested).
    It could also be useful to users in the understanding og the logic behind WP roles.

    You can find it here:
    https://github.com/tony-wips/Members-Capab

  4. Tony Wips
    Member
    Posted 1 year ago #

    That is a starting idea (and very raw for the additional plugins).

    For the WP part, consider the five columns as overlapping in the members new role definition screen. This way you can quickly clone one of the five standards roles do define the new one and the add the ones that come from the additional plugins or custom ones.

    As you can see, in WP each lower role has a set of capabilities which is a sub-set of the capabilities set of the adjacent higher role and this lets you sort all the capabilities as showed in the spreadshet.

    A refinement of this could be applied to the capabilities introduced by the plugins.
    First, the WP API should let you associate each new capability and role to the plugin that introduced it.
    This is a first grouping.
    Whithin this group it shouldn't be difficult to implement an algorithm
    wich assigns a weigth to each capability basing on the roles to which is enabled. After all of them are scanned, the can be sorted basing on the weight and apply the same logic applied for the WP standard capabilities. Overlap the columns and you abtain the layout for the configuration screen.

    And members will shine ;-)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic