Skip to:
Content

bbPress.org

Opened 18 months ago

Closed 8 months ago

#3309 closed defect (fixed)

Allow moderators to reply to pending topics

Reported by: dd32 Owned by: johnjamesjacoby
Milestone: 2.6.6 Priority: high
Severity: normal Version:
Component: API - Moderation Keywords: has-patch
Cc:

Description

While looking into https://meta.trac.wordpress.org/ticket/4904 I found what I think is a bug in bbPress.

It looks like bbp_current_user_can_access_create_reply_form() only checks if the moderator can edit the reply, but in the case of a pending topic without any replies, there's no reply object to check against.

Attached patch seems to work, but I have no idea if it's correct or how it should be done.

Attachments (1)

3309.diff (1.3 KB) - added by dd32 18 months ago.

Download all attachments as: .zip

Change History (8)

@dd32
18 months ago

#1 @dd32
18 months ago

  • Keywords has-patch needs-testing added

I didn't check to see if the patch fully works, only that it showed the reply form, not that it actually worked..

#2 @johnjamesjacoby
18 months ago

  • Component changed from General to API - Moderation
  • Milestone changed from Awaiting Review to 2.6.4
  • Owner set to johnjamesjacoby
  • Priority changed from normal to high
  • Status changed from new to assigned

#3 @johnjamesjacoby
17 months ago

  • Milestone changed from 2.6.4 to 2.6.5

Moving open issues from 2.6.4 to 2.6.5, for 2.6.4 release today.

#4 @man4toman
15 months ago

  • Keywords needs-testing removed

I check the patch with these steps and it works:

1- Login as a moderator
2- Go to 'All Topics' in admin area
3- Click on 'View' link of a Pending topic
4- Content and Reply form showed normally

It works because of view=all in topic url.
If you open the topic url directly(without get method), you will see the reply form only.

#5 @johnjamesjacoby
13 months ago

  • Milestone changed from 2.6.5 to 2.6.6

#6 @johnjamesjacoby
8 months ago

In 7157:

Replies: Allow moderators to reply to pending topics.

This commit adds a check inside of bbp_current_user_can_access_create_reply_form() for the edit_topic capability, and if the user is capable will now allow them to access that form.

This will come in particularly handy for forum moderators who want to reply to topics before they are approved, or to provide a reason to the original poster why a topic will not be approved but without making it public.

In branches/2.6, for 2.6.6. See #3309.

Props dd32, man4toman.

#7 @johnjamesjacoby
8 months ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 7158:

Replies: Allow moderators to reply to pending topics.

This commit adds a check inside of bbp_current_user_can_access_create_reply_form() for the edit_topic capability, and if the user is capable will now allow them to access that form.

This will come in particularly handy for forum moderators who want to reply to topics before they are approved, or to provide a reason to the original poster why a topic will not be approved but without making it public.

In trunk, for 2.7. Fixes #3309.

Props dd32, man4toman.

Note: See TracTickets for help on using tickets.