[buddypress-trac] [BuddyPress] #5115: Admin panels meta cap review for Group and Activity moderation
buddypress-trac
noreply at wordpress.org
Fri Jul 26 00:21:51 UTC 2013
#5115: Admin panels meta cap review for Group and Activity moderation
----------------------------+-----------------------------
Reporter: ericlewis | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Administration | Version: 1.7
Severity: normal | Keywords: has-patch
----------------------------+-----------------------------
The Activity and Groups admin menus are created with similar logic, here's
the Groups for example:
{{{
if ( ! bp_current_user_can( 'bp_moderate' ) )
return;
// Add our screen
$hook = add_menu_page(
__( 'Groups', 'buddypress' ),
__( 'Groups', 'buddypress' ),
'manage_options',
'bp-groups',
'bp_groups_admin',
'div'
);
}}}
This reads strange to me - we check if the user can 'bp_moderate', and
then give add_menu_page the capability 'manage_options'. We should
probably use the same capability 'bp_moderate in the add_menu_page call,
in case an administrator might want to give a user the ability to moderate
Activity and Groups, but not need to give them 'manage_options'.
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5115>
BuddyPress <http://buddypress.org/>
BuddyPress
More information about the buddypress-trac
mailing list