Table of Contents
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:
- Navigate to GravityOps → Forum in your WordPress dashboard.
- Click the Access tab.
- You will see a list of available WordPress roles (e.g., Administrator, Editor, Subscriber).
- For each role, select the appropriate Access Set from the dropdown.
- Example: Map “Subscriber” to “Standard User” and “Administrator” to “Moderator”.
- 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:
- Go to the Forums tab in the plugin settings.
- Click Manage Forums for the Board that contains the forum you want to restrict.
- Find the Forum and click Edit.
- Locate the Access Set dropdown.
- Select the level of access needed for this content (e.g., Standard User or Moderator).
- Click Update Forum.
4. How Permission Hierarchy Works #
The Access system uses a two-tier hierarchy:
- 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.
- 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:
- Log out of your site and try to visit the restricted forum. You should see a “Permission Denied” message.
- Log in with a user whose role is mapped to “Standard User” and verify they can see the forum.
- Log in with a user whose role is NOT mapped and verify they are blocked.