XF 2.2 Permissions, and "There are no threads in this forum."

tonmo

Well-known member
I have use case where I want to restrict visibility of the contents of a forum only to a specific user group (paid). However, I want guests and registered members alike to be able to see that this content exists.

So I want a tab, let's call it "Premium," and everyone sees it. The tab goes to the forum (node). If a user is not logged in, or they are logged in but haven't purchased the upgrade, when they click on the node, ideally they'd see a message saying "Your account doesn't have sufficient privileges to view this content" (or something) and it can link to the Upgrades area where a user can learn more (obviously non-registered users will have to register first).

Here's how I've set up permissions:

1683149091068.webp

This is what gets displayed:

1683149132736.webp

Instead of "There are no threads in this forum." (which is not true), I want it to instead state that the threads in this forum cannot be viewed due to lack of privileges (which is what it says there in the lower right, with regard to posting).
 
Solution
There are various ways of achieving it.

Set the main View node permission to No.

Create a custom error message for that node only.

Optionally use a Notice targeted at everyone except the premium user group.
There are various ways of achieving it.

Set the main View node permission to No.

Create a custom error message for that node only.

Optionally use a Notice targeted at everyone except the premium user group.
 
Solution
Top Bottom