Extend Buddypress Group Forums Capabilities
|Reported by:||aaclayton||Owned by:|
|Cc:||mercijavier@…, jmdodd@…, 3ruce|
Buddypress group members are temporarily granted the capability to read and publish in their own hidden group forums using the function map_topic_meta_caps() in /includes/extend/buddypress/group.php line 179.
This function only runs if the following conditions hold:
if ( ! bp_is_single_item() || ! bp_is_groups_component() || ! bp_is_current_action( 'forum' ) || ! bp_is_action_variable( 0, 'topic' ) )
This results in some circumstances in which a group member doesn't have adequate capability to participate in group forums whenever the action variable is not 'topic'. For example, when using a group forums template with a new topic form below the topics-loop, regular group members will lack the capabilities to create a topic.
Is it necessary to require that the action_variable be 'topic' in order to grant permissions? I think switching group member capabilities would be useful everywhere within the bp_is_current_action( 'forum' ) sub-component.
Unless I'm missing a key reason not to do this, I would recommend conditioning the capability switch only on:
if ( ! bp_is_single_item() || ! bp_is_groups_component() || ! bp_is_current_action( 'forum' ) )
Change History (17)
- Resolution fixed deleted
- Status changed from closed to reopened
comment:10 follow-up: ↓ 11 aaclayton — 14 months ago
- Keywords reporter-feedback added; has-patch removed
- Milestone changed from 2.5 to Future Release
comment:15 aaclayton — 5 months ago
- Resolution set to fixed
- Severity changed from major to normal
- Status changed from reopened to closed