[wp-trac] [WordPress Trac] #45709: Suggestion for User Roles

WordPress Trac noreply at wordpress.org
Thu Dec 20 12:51:06 UTC 2018


#45709: Suggestion for User Roles
-------------------------+-------------------------------------------------
 Reporter:               |       Owner:  (none)
  lotharthesavior        |
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:               |     Version:  5.0.1
  Role/Capability        |
 Severity:  minor        |  Resolution:
 Keywords:               |     Focuses:  administration, multisite, rest-
                         |  api, performance
-------------------------+-------------------------------------------------

Comment (by knutsp):

 Hello @lotharthesavior

 Welcome to Track and thanks for this suggestion.

 Since the `{$table_prefix}roles` option lives in a table with the same
 `$table_prefix` the prefix is obviously redundant. If I remember
 correctly, it has been suggested to remove it quite a few times here on
 Trac.

 However, such a change will not solve anything when it comes to end users,
 like performance. A new `roles` table, like the current option, will only
 hold the very few roles that exists on a site.

 The main problem with the current capabilities system is probably that
 it's inefficient to query for users with a certain capability without
 using the deprecated user_level option. The whole structure could need a
 well thought out overhaul some day.

 Your suggestion will certainly make life easier for those who manually
 export/import or copy db tables, and for the authors of migration plugins,
 but such will have to be weighed against other priorities, the amount of
 work involved and the risk of breaks in backwards compatibility.

 What would be a really useful change is to join a table from users that
 has all the capabilities, so that all user having, like `edit_posts`, can
 be queried by a singe SELECT.

 IMHO.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/45709#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list