WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 3 years ago

#39209 closed enhancement (fixed)

replace 1 check with current_user_can( 'manage_network' ) in wp-signup.php

Reported by: jignesh.nakrani Owned by: flixos90
Milestone: 4.8 Priority: normal
Severity: normal Version:
Component: Role/Capability Keywords: has-patch
Focuses: multisite Cc:
PR Number:

Description (last modified by johnbillion)

replace 1 check with current_user_can( 'manage_network' ) in wp-signup.php;

in addition, change the message string to Greetings Network Administrator! The network currently allows &#8220;%s&#8221; registrations. To change or disable registration go to your <a href="%s">Options page</a>. and the $i18n['blog'] string to site to match current naming conventions

Attachments (3)

39209-1.patch (1.4 KB) - added by jignesh.nakrani 3 years ago.
Replaced is_super_admin() check with current_user_can( 'manage_options' )
39209-2.patch (1.4 KB) - added by jignesh.nakrani 3 years ago.
Hi @flixos90 Thanks for the suggestion. Updated patch and attached.
39209-3.patch (782 bytes) - added by jignesh.nakrani 3 years ago.
Replaced is_super_admin() check with current_user_can( 'manage_network' ) only

Download all attachments as: .zip

Change History (11)

@jignesh.nakrani
3 years ago

Replaced is_super_admin() check with current_user_can( 'manage_options' )

#1 @jignesh.nakrani
3 years ago

  • Keywords has-patch added

#2 @flixos90
3 years ago

  • Focuses multisite added
  • Keywords needs-refresh added
  • Milestone changed from Awaiting Review to 4.8
  • Owner set to flixos90
  • Status changed from new to assigned

Thanks for the patch @jignesh.nakrani! Can you update the capability used there? In the patch you currently have manage_options, but it should be manage_network. The rest of it looks good. :)

#3 @johnbillion
3 years ago

  • Description modified (diff)
  • Keywords needs-patch added; has-patch needs-refresh removed

@jignesh.nakrani
3 years ago

Hi @flixos90 Thanks for the suggestion. Updated patch and attached.

#4 @flixos90
3 years ago

  • Keywords has-patch added; needs-patch removed

Thanks @jignesh.nakrani!

#5 @jeremyfelt
3 years ago

  • Keywords needs-refresh added

The capability change here looks good. I think we should take care of changing the text in another ticket so that it's more obvious from looking at the changeset what's actually being changed here.

@jignesh.nakrani
3 years ago

Replaced is_super_admin() check with current_user_can( 'manage_network' ) only

#6 @jignesh.nakrani
3 years ago

@jeremyfelt updating patch with Replaced is_super_admin() check with current_user_can( 'manage_network' ) only.

Removed text changing from this ticket and created separate ticket #39611.

#7 @jignesh.nakrani
3 years ago

  • Keywords needs-refresh removed

#8 @flixos90
3 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 39944:

Multisite: Replace is_super_admin() with manage_network when showing a message to the network administrator in wp-signup.php.

Props jignesh.nakrani.
Fixes #39209. See #37616.

Note: See TracTickets for help on using tickets.