I need to restrict access to forums so that only selected users can access an individual forum. (The users should apply for a forum and a moderator should decide if the user should be allowed to participate in that forum or not.)
If users visit the forum listing page for the first time, they should only see all forums listed but they should not be able to see the topics.
I have used Flag module to implement a subscription system.
I have set a flag 'subscribe_forum'
that allows users to flag a forum, and another flag 'approve_forum_subscription'
that allows an administrator to flag a flagging, which means the subscription of the user is accepted.
What I want to do is to grant that user access only to those forums which he has subscribed to and has been approved by an administrator.
The solution you would suggest doesn't have to use this flag system. I am open to any other suggestions.
I have installed Forum Access module, however it allows me to restrict access based on roles, but I need to have a list of users for each individual forum. The only thing that is useful for my case on this module is the ability to set a moderator for individual forums.
Edit: I am also using Advanced Forum module to extend the functionality of the core Forum.
UPDATE:
I have mostly achieved my goal using Panel pages which are already provided by Advanced Forum, adding some custom selection rules.
I have added a PHP Code rule which returns TRUE if the user has flagged the forum, and a moderator accepted it (i.e. flagged the flagging of the user), and FALSE otherwise. I have also added a fallback variant which shows only an 'access denied' message in a panel pane.
I have done the same thing to the topic listing panel, as well.
Then, I have enabled the panel page that overrides node/node% and added 2 selection rules, one for checking if the content type is forum and the other one is the custom PHP.
So, I have almost what I wanted to have, but I am not yet completely sure if this method I follow is a good one. To be honest, I don't find it elegant enough.
I am still open to other suggestions. It can also be a completely different approach.
Thanks in advance.