[wp-trac] [WordPress Trac] #44468: Introduce infrastructure for testing primitive capabilities granted via `user_has_cap`

WordPress Trac noreply at wordpress.org
Tue Jun 26 18:02:29 UTC 2018


#44468: Introduce infrastructure for testing primitive capabilities granted via
`user_has_cap`
-----------------------------+---------------------
 Reporter:  flixos90         |       Owner:  (none)
     Type:  enhancement      |      Status:  new
 Priority:  normal           |   Milestone:  5.0
Component:  Role/Capability  |     Version:
 Severity:  normal           |  Resolution:
 Keywords:  has-patch        |     Focuses:
-----------------------------+---------------------
Changes (by flixos90):

 * keywords:   => has-patch


Comment:

 [attachment:44468.diff] adds the infrastructure for testing the so-called
 "dynamic primitive capabilities":

 * All those capabilities need to be added to the
 `_getSingleSiteDynamicPrimitiveCaps()` and
 `_getMultiSiteDynamicPrimitiveCaps()` methods, just how it is for the
 other two types of capabilities.
 * It is checked that each of the capabilities are correctly granted via
 `user_has_cap`.
 * It is also checked that each of the capabilities are actually granted
 via `user_has_cap` and not through another means (like the database).

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


More information about the wp-trac mailing list