You may experience the error forum/noviewdiscussionspermission after upgrading from previous Moodle versions or in any other circumstance in which the actual user does not have the needed permissions.
This error means that the actual user has no permissions to view the discussion/forum posts.
If you want the "Authenticated User" Role to be capable of viewing the posts, e.g. on the Front Page, proceed as follows:
- As an administrator, navigate to Site Administration > Front Page > Front Page roles
- Click on the "Override roles" link
- Click on "Authenticated User"
- Find the Forum heading, then "View Discussions" (mod/forum:viewdiscussion capability) and tick the second radio input (Allow)
- At the bottom, press "Save changes"
If you do not want anonymous users to be capable of reading your news posts on the Front Page, proceed as described and choose the Guest user and click the radio button in the third column to PREVENT (or fourth column PROHIBIT) this permission.
Remember that you can also change the default Role on the Front Page:
- Access Site Administration > Front Page > Front Page settings
- Set the default front page role, e.g to student or authenticated user
Be careful when combining roles and capabilities. My preference/setting is:
- Default Front Page Role: none
- Guest Role on Front Page: PREVENT mod/forum:viewdiscussion capability
- Authenticated User on Front Page: ALLOW mod/forum:viewdiscussion capability