View Categories

Creating a Members-Only Forum

Restricting access to your forum is a common requirement for paid communities, internal company boards, or private groups. GravityOps Forum makes this easy through its Access system.

1. Understand Access Sets #

By default, the plugin uses three access sets, each representing a different level of permission:

  • Standard User: Typical logged-in users who can view, create topics, reply, and edit their own posts.
  • Moderator: Users who can manage content (lock, sticky, delete, edit all posts).
  • Read Only: Users who can only view content and cannot post or reply.

2. Map WordPress Roles to Access Sets #

Before restricting a forum, you must ensure your WordPress roles are mapped to the correct access sets:

  1. Navigate to GravityOpsForum in your WordPress dashboard.
  2. Click the Access tab.
  3. You will see a list of available WordPress roles (e.g., Administrator, Editor, Subscriber).
  4. For each role, select the appropriate Access Set from the dropdown.
    • Example: Map “Subscriber” to “Standard User” and “Administrator” to “Moderator”.
  5. Click Map Role.

Note: Any role that is not explicitly mapped will have no access to restricted forums (fail-closed security).

3. Restrict a Forum #

Once your roles are mapped, you can restrict specific areas of your forum:

  1. Go to the Forums tab in the plugin settings.
  2. Click Manage Forums for the Board that contains the forum you want to restrict.
  3. Find the Forum and click Edit.
  4. Locate the Access Set dropdown.
  5. Select the level of access needed for this content (e.g., Standard User or Moderator).
  6. Click Update Forum.

4. How Permission Hierarchy Works #

The Access system uses a two-tier hierarchy:

  1. User-Role Hierarchy: Access is granted if your mapped set provides a superset of the forum’s requirements. For example, if you assign Read Only to a forum, users with Standard User or Moderator access will automatically have entry.
  2. Forum-to-Topic Inheritance: All topics within a forum inherit the minimum access requirement assigned at the forum level.

5. Testing Your Restrictions #

To verify your setup:

  1. Log out of your site and try to visit the restricted forum. You should see a “Permission Denied” message.
  2. Log in with a user whose role is mapped to “Standard User” and verify they can see the forum.
  3. Log in with a user whose role is NOT mapped and verify they are blocked.