[wp-trac] [WordPress Trac] #39205: Replace is_super_admin() check with current_user_can( 'upgrade_database' )

WordPress Trac noreply at wordpress.org
Fri Dec 9 16:34:26 UTC 2016


#39205: Replace is_super_admin() check with current_user_can( 'upgrade_database' )
--------------------------------------+------------------------
 Reporter:  dhanendran                |       Owner:  flixos90
     Type:  enhancement               |      Status:  assigned
 Priority:  normal                    |   Milestone:  4.8
Component:  Role/Capability           |     Version:
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch needs-dev-note  |     Focuses:  multisite
--------------------------------------+------------------------
Changes (by flixos90):

 * status:  new => assigned
 * focuses:  administration, multisite => multisite
 * owner:   => flixos90
 * milestone:  Awaiting Review => 4.8
 * keywords:   => has-patch needs-dev-note
 * type:  defect (bug) => enhancement


Comment:

 Thanks for the patch @dhanendran, looks good!

 We'll need to have some discussion on how this new capability should be
 handled: Should we not handle it at all (meaning only the super admin has
 that capability) or should we add a clause in `map_meta_cap()` to grant
 that capability to regular admins on non-multisite setups as well? Is
 there another place in core where this capability could be used?

 We definitely need to document the new capability in a dev note and add it
 to the unit tests array in
 `Tests_User_Capabilities::_getMultiSiteMetaCaps()`.

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


More information about the wp-trac mailing list