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.
If authenticated users don't have permission to create forum nodes, anon users are still invited to log in or register to post, even though they still won't be able to.
Looking at comment module, correct behaviour is to show nothing at all in this case.
Comment | File | Size | Author |
---|---|---|---|
#2 | 788320.patch | 773 bytes | pfrenssen |
Comments
Comment #1
joachim CreditAttribution: joachim commentedComment module does it like this:
For forum, the same approach means checking any number of 'create NODETYPE' permissions. Anyone got any better ideas?
Comment #2
pfrenssenThis patch fixes it. If the user is anonymous and would not be able to post new forum content after logging in, the text 'You are not allowed to post new content in the forum.' is shown instead of 'Log in to post new content in the forum.' to avoid false expectations.
Comment #3
pfrenssenComment #4
joachim CreditAttribution: joachim commentedOther node types may be in the forum though -- see how forum_menu_local_tasks_alter() accounts for that, for instance.