Skip to:
Content

Opened 3 years ago

Closed 2 years ago

#2905 closed defect (fixed)

BuddyPress: Banned group member can still post if form is visible

Reported by: r-a-y Owned by: johnjamesjacoby
Milestone: 2.6 Priority: normal
Severity: major Version: 2.2
Component: Extend - BuddyPress Keywords: has-patch
Cc:

Description

Originally posted on BuddyPress Trac:
https://buddypress.trac.wordpress.org/ticket/6835

This is a follow-up to #2095. #2095 hides the post form for a banned group member, but if the banned group member presses the "Back" button in their browser prior to the ban, they can still view the post form and is able to create additional replies.

We also need to check the permissions before the post is actually submitted.

Attached is a patch that does this.

Attachments (3)

2905.01.patch (3.6 KB) - added by r-a-y 3 years ago.
2905.2.diff (646 bytes) - added by thebrandonallen 3 years ago.
2905.03.patch (697 bytes) - added by r-a-y 3 years ago.

Download all attachments as: .zip

Change History (7)

@r-a-y
3 years ago

#1 @thebrandonallen
3 years ago

Updated patch uses meta caps to block a banned user with access to a topic/reply form from posting.

@r-a-y Can you confirm that this still works as intended?

@r-a-y
3 years ago

#2 @r-a-y
3 years ago

Nice approach, @thebrandonallen.

However 2.diff didn't work for me, but your patch gave me an idea! 03.patch should work for our needs.

#3 @thebrandonallen
3 years ago

@r-a-y Thanks for getting back. If it works for you, it works for me :)

#4 @johnjamesjacoby
2 years ago

  • Owner set to johnjamesjacoby
  • Resolution set to fixed
  • Status changed from new to closed

In 6229:

BuddyPress: Prevent reading/publishing if group member is banned.

Fixes #2905. Props thebrandonallen, r-a-y.

Note: See TracTickets for help on using tickets.