Users: On the 'Add New User' screen, don't show the roles dropdown if the current user can't promote other users.

Fixes #50345.
Built from https://develop.svn.wordpress.org/trunk@48042


git-svn-id: http://core.svn.wordpress.org/trunk@47809 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dominik Schilling 2020-06-14 17:03:10 +00:00
parent 9f7a7f8d57
commit 893c580831
2 changed files with 3 additions and 1 deletions

View File

@ -575,6 +575,7 @@ if ( current_user_can( 'create_users' ) ) {
</td>
</tr>
<?php } // End if ! is_multisite(). ?>
<?php if ( current_user_can( 'promote_users' ) ) { ?>
<tr class="form-field">
<th scope="row"><label for="role"><?php _e( 'Role' ); ?></label></th>
<td><select name="role" id="role">
@ -587,6 +588,7 @@ if ( current_user_can( 'create_users' ) ) {
</select>
</td>
</tr>
<?php } ?>
<?php if ( is_multisite() && current_user_can( 'manage_network_users' ) ) { ?>
<tr>
<th scope="row"><?php _e( 'Skip Confirmation Email' ); ?></th>

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.5-alpha-48041';
$wp_version = '5.5-alpha-48042';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.