Skip to content

Commit

Permalink
PROD-7433 - Allow schedule post on news feed for group only when sett…
Browse files Browse the repository at this point in the history
…ing enable. Even if its admin user.
  • Loading branch information
jitendrabanjara1991 committed May 16, 2024
1 parent 59a6b32 commit 7fe22d1
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/bp-templates/bp-nouveau/includes/groups/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -482,11 +482,8 @@ function bp_nouveau_prepare_group_for_js( $item ) {
'group_video' => ( bp_is_active( 'video' ) && bp_is_group_video_support_enabled() && bb_video_user_can_upload( bp_loggedin_user_id(), $item->id ) ),
);

if (
function_exists( 'bb_is_enabled_activity_schedule_posts' ) &&
bb_is_enabled_activity_schedule_posts() &&
! bp_current_user_can( 'administrator' )
) {
$val = function_exists( 'bb_is_enabled_activity_schedule_posts_filter' ) ? bb_is_enabled_activity_schedule_posts_filter() : false;
if ( $val ) {
$is_admin = groups_is_user_admin( bp_loggedin_user_id(), $item->id );
$is_mod = groups_is_user_mod( bp_loggedin_user_id(), $item->id );
if ( $is_admin || $is_mod ) {
Expand Down

0 comments on commit 7fe22d1

Please sign in to comment.