[wp-trac] [WordPress Trac] #39063: Move the logic preventing non-super-admins from deleting themselves into `map_meta_cap()`

WordPress Trac noreply at wordpress.org
Sun Dec 4 18:46:25 UTC 2016


#39063: Move the logic preventing non-super-admins from deleting themselves into
`map_meta_cap()`
-----------------------------+-----------------
 Reporter:  flixos90         |      Owner:
     Type:  enhancement      |     Status:  new
 Priority:  normal           |  Milestone:  4.8
Component:  Role/Capability  |    Version:
 Severity:  normal           |   Keywords:
  Focuses:  multisite        |
-----------------------------+-----------------
 This is part of the #37616 task. In `wp-admin/users.php` there are two `!
 is_super_admin()` checks to prevent non-super-admins from deleting
 themselves. This logic should rather be placed in `map_meta_cap()` instead
 of being duplicated in that file. Furthermore, since the mentioned ticket
 aims at removing `is_super_admin()` checks outside of `map_meta_cap()`,
 this will also fulfill that task's goal for these two occurrences.

 See https://core.trac.wordpress.org/ticket/37616#comment:23

--
Ticket URL: <https://core.trac.wordpress.org/ticket/39063>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list