Skip to:
Content

BuddyPress.org

Changes between Initial Version and Version 1 of Ticket #5869, comment 1


Ignore:
Timestamp:
09/09/2014 06:04:03 PM (6 years ago)
Author:
r-a-y
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #5869, comment 1

    initial v1  
    33I took a closer look at why the `'manage_options'` cap is required even though the `'bp_moderate'` cap is set for a user and it appears this is a holdover from an earlier implementation of `'map_meta_caps'`.
    44
    5 It appears that BP forces users with the `'bp_moderate'` cap to also have the `'manage_options'` cap.  See:
     5It appears that BP forces users with the `'bp_moderate'` cap to also have the `'manage_options'` cap on single site.  See:
    66https://buddypress.trac.wordpress.org/browser/tags/2.0.2/bp-core/bp-core-caps.php#L199
    77
    8 For your use-case, I would recommend removing BP's filter in the interim:
    9 
    10 {{{
    11 remove_filter( 'map_meta_cap', '_bp_enforce_bp_moderate_cap_for_admins', 10, 4 );
    12 }}}
    13 
    14 This should allow you to do what you want.
     8For v2.2, we'll probably need to audit capabilities with BuddyPress (see #5121) before tackling this.