When restoring a course through backup and restore it appears several roles get automatically re-assigned when getting re-created. Guest and authenticated user are automatically added to the view block permissions even when they are prohibited in the original course.
This is an easy fix, but was hoping there was a way that the permissions we have set up are maintained when the course is restored.
We have also tested the course templates plugin and this suffers from the same issues. Have tested in Totara 11 and 12.