[wp-trac] [WordPress Trac] #44176: Un-map Privacy Capabilities

WordPress Trac noreply at wordpress.org
Mon May 21 16:19:36 UTC 2018


#44176: Un-map Privacy Capabilities
-------------------------------------+------------------------------
 Reporter:  desrosj                  |       Owner:  (none)
     Type:  defect (bug)             |      Status:  new
 Priority:  normal                   |   Milestone:  Awaiting Review
Component:  Privacy                  |     Version:  4.9.6
 Severity:  normal                   |  Resolution:
 Keywords:  needs-patch 2nd-opinion  |     Focuses:
-------------------------------------+------------------------------

Comment (by flixos90):

 > There's really no way around this other than an update to the role
 management plugin to add support for the newly added capabilities.

 I fully agree with that statement. The only issue I see with the current
 core implementation of the new capabilities is that those ''are not'' meta
 capabilities. They are primitive capabilities that can't / shouldn't be
 part of the database.

 Due to that, I'd recommend to grant them via `user_has_cap`, based on the
 same capabilities that they are currently mapped to in `map_meta_cap`.
 Such a filter can easily be unhooked if someone wants to add the
 capabilities in another way. With them being part of `map_meta_cap()` it's
 harder to tweak the behavior because they are hard-coded in the switch
 clause in the actual function.

 What do you think @johnbillion? See
 https://core.trac.wordpress.org/ticket/41332#comment:3 for more thoughts
 on primitive capabilities in the database vs primitive capabilities via
 `user_has_cap` vs meta capabilities.

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


More information about the wp-trac mailing list