[wp-trac] [WordPress Trac] #16501: 'Add Existing' button should be dependent on is_multisite

WordPress Trac wp-trac at lists.automattic.com
Wed Feb 9 12:57:32 UTC 2011


#16501: 'Add Existing' button should be dependent on is_multisite
-----------------------------+------------------
 Reporter:  nacin            |       Owner:
     Type:  defect (bug)     |      Status:  new
 Priority:  normal           |   Milestone:  3.1
Component:  Role/Capability  |     Version:
 Severity:  major            |  Resolution:
 Keywords:                   |
-----------------------------+------------------

Comment (by nacin):

 Okay. Let's approach this a bit differently.

 There are three distinct bugs here.

  1. You can't create a user unless you have promote_users. This is not by
 design, and is a regression. Patch attached, the wp-admin/menu.php diff
 handles this.

  2. The bulk role dropdown doesn't work if you don't have promote_users,
 but we show it anyway. This isn't a regression, but I suggest we fix it
 two-fold: One, add the cap check on display. Two, add promote_users to the
 promote action handler. (We check promote_user on each individual user,
 which maps to promote_users, but we should also check the main cap.)

  3. You can change the role of a user -- either on creation (changing it
 from default_role), or on editing the individual user. This is not a
 regression, and I don't want to fix this at this point in the cycle. The
 problem is, anyone who didn't account for promote_users in a custom role
 in 3.0 would have had a broken bulk role dropdown, but everything else
 would have worked fine. Suddenly hiding role dropdowns on user edit or
 making them read-only could be a very bad idea. Especially in RC4 stage.

 Incoming patch addresses points 1 and 2.

 Next up, looking into what happens when you have promote_users but not
 create_users. I think we're good here with one exception, that the 'Add
 Existing' button shouldn't show up in single-site, because all existing
 users -- even those without a role -- are displayed when not running
 multisite.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/16501#comment:7>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list