[wp-trac] [WordPress Trac] #39199: Replace `is_super_admin()` checks with `manage_network` cap checks in wp-includes/option.php

WordPress Trac noreply at wordpress.org
Tue Dec 20 16:54:20 UTC 2016


#39199: Replace `is_super_admin()` checks with `manage_network` cap checks in wp-
includes/option.php
-------------------------------------+------------------------
 Reporter:  chandrapatel             |       Owner:  flixos90
     Type:  enhancement              |      Status:  assigned
 Priority:  normal                   |   Milestone:  4.8
Component:  Role/Capability          |     Version:
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-refresh  |     Focuses:  multisite
-------------------------------------+------------------------
Changes (by flixos90):

 * keywords:  has-patch 2nd-opinion => has-patch needs-refresh


Comment:

 I agree with @johnbillion that the check is redundant. The check was
 introduced in [changeset:22256] to prevent the user settings from being
 set for a super admin who is not a member of the site. I think it makes
 sense for this restriction to exist for any kind of user, so we should be
 able to remove the check.

 I noticed that this would also affect `wp-admin/includes/dashboard.php`
 line 490 - for some reason we missed this `is_super_admin()` occurrence
 entirely before, but it has exactly the same purpose like the ones in this
 ticket, so we can deal with it in here too.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/39199#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list