[wp-trac] [WordPress Trac] #16291: user role drop down inaccurate on ms-sites.php

WordPress Trac wp-trac at lists.automattic.com
Tue Jan 18 21:23:32 UTC 2011


#16291: user role drop down inaccurate on ms-sites.php
-------------------------+-------------------------------------------------
 Reporter:  hughestm@…   |      Owner:
     Type:  defect       |     Status:  new
  (bug)                  |  Milestone:  Awaiting Review
 Priority:  normal       |    Version:  3.0.4
Component:  General      |   Keywords:  roles, capabilities, network,
 Severity:  normal       |  multisite
-------------------------+-------------------------------------------------
 If a user has been assigned a role and an individual capability, the user
 list doesn't show the correct role for the user.

 This is the scenario to replicate this issue.  User is currently given one
 role (ie. editor).  Then some plug-in adds an individual capability (db
 has role and cap serialized - order is important). You then go and change
 the role(ie. publisher) of that user using ms-sites.php (db has cap then
 role serialized). When you return to ms-sites.php (not immediate page
 load, but refresh, or new page load), the drop down menu for the user in
 question will show Administrator. It appears, that ms-sites is pulling the
 first item from the serialized list, and since it isn't a role, it doesn't
 know how to populate the drop down.

 This is a particular issue, if you go to the page to change any
 information not related to user permissions.  Anyone whose accounts had
 the extra cap would suddenly become Administrators.

 There may be other scenarios where this same things happens, but as best I
 can tell this is the particular scenario that is causing me problems.

 Also, I do realize that there is a potential for user->role->cap overhaul
 in a future release, but since it doesn't seem to be part of the 3.1
 milestone, I thought this should be fixed.

 As another note, the users.php page seems to handle this scenario a bit
 better.  The solution might be over there.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/16291>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list