1 | Index: bp-core/admin/bp-core-schema.php |
---|
2 | =================================================================== |
---|
3 | --- bp-core/admin/bp-core-schema.php (revision 2952) |
---|
4 | +++ bp-core/admin/bp-core-schema.php (working copy) |
---|
5 | @@ -147,6 +147,10 @@ |
---|
6 | ) {$charset_collate};"; |
---|
7 | |
---|
8 | dbDelta($sql); |
---|
9 | + |
---|
10 | + $role =& get_role( 'administrator' ); |
---|
11 | + if ( !empty( $role ) ) |
---|
12 | + $role->add_cap( 'bp_manage_groups' ); |
---|
13 | } |
---|
14 | |
---|
15 | function bp_core_install_private_messaging() { |
---|
16 | Index: bp-groups.php |
---|
17 | =================================================================== |
---|
18 | --- bp-groups.php (revision 2952) |
---|
19 | +++ bp-groups.php (working copy) |
---|
20 | @@ -50,10 +50,10 @@ |
---|
21 | $bp->groups->current_group = new BP_Groups_Group( $group_id ); |
---|
22 | |
---|
23 | /* Using "item" not "group" for generic support in other components. */ |
---|
24 | - if ( is_site_admin() ) |
---|
25 | + if ( is_site_admin() || current_user_can( 'bp_manage_groups' ) ) |
---|
26 | $bp->is_item_admin = 1; |
---|
27 | else |
---|
28 | - $bp->is_item_admin = groups_is_user_admin( $bp->loggedin_user->id, $bp->groups->current_group->id ); |
---|
29 | + $bp->is_item_admin = groups_is_user_admin( $bp->loggedin_user->id, $bp->groups->current_group->id; |
---|
30 | |
---|
31 | /* If the user is not an admin, check if they are a moderator */ |
---|
32 | if ( !$bp->is_item_admin ) |
---|