Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
05/24/2024 05:43:34 AM (2 years ago)
Author:
imath
Message:

Groups: improve group activity moderation delegation to admins & mods

  • Introduce a new BP Groups global setting to let Site Administrators decide whether group admins & mods can delete their group activities or not.
  • NB: Group creators can keep the control about who can delete their group activities using group role promotion (allow: promote some members as mods or admins. Disallow: do not promote anyone).
  • Make sure the bp_groups_filter_activity_user_can_delete() filter takes in account this setting and behaves as expected (eventually allowing group admins/mods to delete group activities).
  • Add unit tests

This ticket is a perfect example of a great collaborative work between all members of the BP Team. Great job 💪.

Props: emaralive, vapvarun, dcavins, espellcaste, needle

Fixes #8728
Closes ​https://github.com/buddypress/buddypress/pull/278

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/admin/bp-core-admin-settings.php

    r13818 r13870  
    352352}
    353353
     354/**
     355 * 'Enable group activity deletions.
     356 *
     357 * @since 14.0.0
     358 */
     359function bp_admin_setting_callback_group_activity_deletions() {
     360?>
     361        <input id="bp-disable-group-activity-deletions" name="bp-disable-group-activity-deletions" type="checkbox" value="1" <?php checked( ! bp_disable_group_activity_deletions() ); ?> />
     362        <label for="bp-disable-group-activity-deletions"><?php esc_html_e( "Allow group administrators and moderators to delete activity items from their group's activity stream", 'buddypress' ); ?></label>
     363<?php
     364}
     365
    354366/** Account settings Section ************************************************************/
    355367
    … …  
    436448                        'bp-disable-group-avatar-uploads',
    437449                        'bp-disable-group-cover-image-uploads',
     450                        'bp-disable-group-activity-deletions',
    438451                        'bp_disable_blogforum_comments',
    439452                        'bp-disable-profile-sync',
Note: See TracChangeset for help on using the changeset viewer.