Make WordPress Core

Opened 16 years ago

Closed 11 years ago

Last modified 11 years ago

#16719 closed defect (bug) (fixed)

Remove vestige add_users capability

Reported by: nacin Owned by: dd32
Priority: normal Milestone: 4.4
Component: Role/Capability Version:
Severity: normal Keywords: has-patch commit
Cc: Focuses:

Description

Listed in populate_roles_300() and added in [14174], it was never used. The situation it was presumably introduced for now falls on promote_users.

Attachments (4)

patch16719.diff​ (483 bytes ) - added by renoirb 15 years ago.
Remove legacy hook as per proposed
16719-1.patch​ (986 bytes ) - added by Craig Ralston 11 years ago.
16719-2.patch​ (1012 bytes ) - added by Craig Ralston 11 years ago.
16179.diff​ (928 bytes ) - added by boonebgorges 11 years ago.

Download all attachments as: .zip

Change History (22)

@renoirb
15 years ago

Remove legacy hook as per proposed

#1 @nacin
14 years ago

  • Keywords has-patch added
  • Milestone Future Release → 3.5

Wondering whether we should go through the trouble of also removing it in an upgrade routine.

#2 @markjaquith
14 years ago

Four plugins in the repo are using it. Should we yank the actual cap and then map it to promote_users? Either way, I'm thinking that the actual cap should be removed from any roles that have it.

#3 @nacin
14 years ago

Either way, I'm thinking that the actual cap should be removed from any roles that have it.

Seems fine to me. We can use map_meta_cap to map it to promote_users. Opens us up to adding it in the future.

#4 @nacin
14 years ago

In [22300]:

Comment that the add_users capability was never used and has its days numbered. see #16719.

#5 @nacin
14 years ago

  • Milestone 3.5 → Future Release

Per scrub.

#6 @chriscct7
11 years ago

  • Keywords needs-patch good-first-bug added; 3.2-early has-patch removed

Needs patch that removes cap from users and map_meta_cap's the cap as described in comment:2

#7 @Craig Ralston
11 years ago

  • Keywords has-patch added; needs-patch removed

16719-1.patch removes add_users legacy cap and maps it to promote_users

Last edited 11 years ago by Craig Ralston (previous) (diff)

#8 @DBrumbaugh10Up
11 years ago

I think I would like to work on this, I'll take a look at it.

#9 @wonderboymusic
11 years ago

  • Keywords needs-refresh added
  • Milestone Future Release → 4.4

#10 @Craig Ralston
11 years ago

  • Keywords needs-refresh removed

16719-2.patch refreshes 16719-1.patch

#11 @wonderboymusic
11 years ago

  • Owner set to wonderboymusic
  • Resolution → fixed
  • Status new → closed

In 35507:

Roles: map add_users cap to promote_users and remove it.

"Never used, will be removed." - The Ghost of 3.5 Nacin

Props Craig Ralston, renoirb.
Fixes #16719.

#12 @nacin
11 years ago

  • Resolution fixed
  • Status closed → reopened

It seemed like 3 years ago, @markjaquith and I agreed:

Wondering whether we should go through the trouble of also removing it in an upgrade routine.

I'm thinking that the actual cap should be removed from any roles that have it.

An upgrade routine seems prudent. Please re-close if you disagree.

#13 @wonderboymusic
11 years ago

  • Owner changed from wonderboymusic to dd32
  • Status reopened → assigned

This ticket was mentioned in ​Slack in #core by wonderboymusic. ​View the logs.


11 years ago

@boonebgorges
11 years ago

#15 @boonebgorges
11 years ago

  • Keywords good-first-bug removed

16179.diff​ introduces the migration routine suggested above.

#16 @dd32
11 years ago

  • Keywords commit added

Noting that I've reviewed the patch, and it looks good to me (assuming it works ;) )

#17 @boonebgorges
11 years ago

  • Resolution → fixed
  • Status assigned → closed

In 35701:

On 4.4 upgrade, remove the unused 'add_users' cap from all roles.

Fixes #16719.

#18 @havahula
11 years ago

Not sure if this is the right place but it would be good to update the codex on this one:
​https://codex.wordpress.org/Roles_and_Capabilities#add_users

Note: See TracTickets for help on using tickets.