Make WordPress Core

Opened 16 years ago

Closed 12 years ago

#16291 closed defect (bug) (fixed)

user role drop down inaccurate on ms-sites.php

Reported by: hughestm@… Owned by:
Priority: normal Milestone: 3.5
Component: Role/Capability Version: 3.0.4
Severity: normal Keywords:
Cc: Focuses: multisite

Description

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.

Change History (3)

#1 @scribu
16 years ago

  • Component GeneralRole/Capability
  • Milestone Awaiting ReviewFuture Release

We are only dealing with regressions from the previous version in the 3.1 milestone now, so this won't make it in the next release anyway.

#2 @chriscct7
12 years ago

  • Keywords needs-patch added; roles capabilities network removed

#3 @jeremyfelt
12 years ago

  • Keywords needs-patch removed
  • Milestone Future Release3.5
  • Resolutionfixed
  • Status newclosed

Things have come a long way since roles were selectable for a user in wp-admin/ms-sites.php. Without going deep on history, this was effectively fixed in [22687] for #22361 in 3.5.

Note: See TracTickets for help on using tickets.