Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This simple patch (basically s/access content/access forums/g) makes it possible to restrict view access to forums.
This is useful e.g. for sites that want anonymous users to be able to see pages etc. but want people to have to log in before reading the forums.
I don't have a HEAD install anywhere, but the equivalent changes on my 4.5 installation are working just fine.
Comment | File | Size | Author |
---|---|---|---|
access-forums.patch | 1.17 KB | willmoy | |
Comments
Comment #1
moshe weitzman CreditAttribution: moshe weitzman commentedthis won't hide forum posts from the home page, etc. if you want this type of access control, you have to implement a node access module. see the node permission API.
Comment #2
chx CreditAttribution: chx commentedcheck my sendbox for privateterms.module. With that, you can define terms which requires access privateterms privilege. You can not see nodes which are attached to these terms without that privilege, too.
It requires a very small taxonomy patch. It's 4.6 only. It does not use node access system for performance reasons and it does not work when a node belongs to multiple private terms. However, this very rarely happens with forum.