[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 17:58:28 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
--------------------------------------+------------------------

Comment (by johnjamesjacoby):

 > Should we add a clause in map_meta_cap() to grant that capability to
 regular admins on non-multisite setups as well?

 This is what I recommend we work towards. It's the most backwards
 compatible, and provides a filterable funnel for all database upgrade
 checks.

 > Is there another place in core where this capability could be used?

 * Maybe `wp_should_upgrade_global_tables()`?
 * Maybe`wp_upgrade()`?
 * Maybe some additional context could/should be passed in, so plugins can
 come to their own conclusions

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


More information about the wp-trac mailing list