Skip to:
Content

bbPress.org

Opened 3 days ago

Closed 28 hours ago

Last modified 27 hours ago

#3702 closed enhancement (fixed)

Add a site-wide open/closed forums status

Reported by: johnjamesjacoby Owned by: johnjamesjacoby
Priority: normal Milestone: 2.6.20
Component: API - Settings/Options Version:
Severity: normal Keywords:
Cc:

Description (last modified by johnjamesjacoby)

Edit: after thinking about this more, this should be a site-wide open/closed forums status, not a temporary pause switch. Users should see that posting is closed, without any suggestion that the state is temporary or that reopening is promised.

bbPress already has open/closed states for individual forums and topics. Introduce a separate _bbp_forums_status option with open and closed as its initial values, defaulting to open for compatibility. This is an explicit site-wide policy: do not infer it from the statuses of individual forums, and do not write closed to every forum's or topic's stored status.

When the site-wide status is closed, reuse the existing closed-forum and closed-topic notices where appropriate, and reject new topic and reply submissions server-side. Form-access checks alone are insufficient. Cover every supported creation path, including front-end forms and direct requests, WordPress admin, REST, XML-RPC, and topics without a forum. The site-wide check must not depend on a forum ID being present, and must not be bypassed by posting capabilities that normally allow content in an individually closed forum. When the status is open, existing per-forum, per-topic, and capability rules continue to apply.

Keep forum creation and existing forum relationships independent of this posting status. In particular, BuddyPress should continue creating and associating group forums while site-wide posting is closed, so those forums already exist if the status later changes to open. Existing content should remain intact. Whether editing existing topics and replies belongs to a broader read-only policy is a separate decision.

Acceptance criteria:

  • The default open value preserves current behavior.
  • closed prevents new topics and replies through every supported user-submission path, for anonymous and logged-in users, including forum-less topics and BuddyPress group forums. A custom theme rendering a form cannot bypass the check.
  • User-facing templates show an appropriate existing closed notice without changing the literal stored status of any forum or topic.
  • Forum creation and BuddyPress group-forum provisioning still work; no existing content or per-object status is changed.
  • Returning to open restores posting only where existing object-level and capability checks permit it.
  • Add focused regression tests across submission paths, no-forum topics, and BuddyPress provisioning.

Change History (5)

#1 @johnjamesjacoby
3 days ago

  • Description modified (diff)
  • Summary Add a site-wide setting to pause new topics and replies → Add a site-wide open/closed forums status

#2 @johnjamesjacoby
3 days ago

I think the site-wide closed state should preserve the capability exceptions that already apply to individually closed forums and topics. Keymasters and appropriately scoped moderators can still post; a forum moderator's exception applies only to forums they moderate. The current description's statement that posting capabilities must not bypass closed, and its blanket prohibition for all logged-in users, are too strict.

I propose adding frozen now as a third value of _bbp_forums_status: open, closed, and frozen. Unlike closed, frozen would be a hard stop on creating new forums, topics, or replies regardless of role or entry point, including BuddyPress Group Forum provisioning. Front-end submissions, WordPress admin, REST, XML-RPC, and other supported creation paths should agree. This could be useful on our own multisite forums. The state should not rewrite individual forum or topic statuses or remove existing content.

The Settings description should make the distinction explicit: closed restricts ordinary posting while retaining moderator and Keymaster exceptions and allowing group forums to be created; frozen prevents all new forum content, including new BuddyPress Group Forums. Whether frozen also prevents edits to existing content should be decided explicitly before implementation.

#3 @johnjamesjacoby
28 hours ago

  • Owner set to johnjamesjacoby
  • Resolution → fixed
  • Status new → closed

In 7851:

Forums: Add a site-wide status setting.

Introduce open, closed, and frozen posting policies. Closed reserves new topics and replies for Keymasters and site-wide Moderators. Frozen stops ordinary forum, topic, and reply creation, while allowing BuddyPress Group Forum creation, and reserves edits of existing forum content for Keymasters and site-wide Moderators.

Expose the control in Forums Settings, enforce it through capabilities, forms, REST, and XML-RPC, and add PHPUnit coverage.

In trunk, for 2.7.

Fixes #3702.

#4 @johnjamesjacoby
27 hours ago

In 7854:

Forums: Backport the site-wide status setting.

Introduce open, closed, and frozen posting policies. Closed reserves new topics and replies for Keymasters and site-wide Moderators. Frozen stops ordinary forum, topic, and reply creation, while allowing BuddyPress Group Forum creation, and reserves edits of existing forum content for Keymasters and site-wide Moderators.

Expose the control in Forums Settings, enforce it through capabilities, forms, REST, and XML-RPC, and add PHPUnit coverage.

In branches/2.6, for 2.6.20.

See #3702.

#5 @johnjamesjacoby
27 hours ago

In 7855:

Forums: Correct status introduction version.

Update the Forum Status annotations after the feature was backported to the 2.6 branch for bbPress 2.6.20.

In trunk, for 2.7.

See #3702.

Note: See TracTickets for help on using tickets.