File tree Expand file tree Collapse file tree
src/CoreBundle/Controller Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1414use Chamilo \CoreBundle \Repository \Node \CourseRepository ;
1515use Chamilo \CoreBundle \Repository \SystemTemplateRepository ;
1616use Chamilo \CoreBundle \Repository \TemplatesRepository ;
17+ use Chamilo \CoreBundle \Security \Authorization \Voter \CourseVoter ;
1718use Chamilo \CoreBundle \Settings \SettingsManager ;
1819use Chamilo \CourseBundle \Entity \CDocument ;
1920use Chamilo \CourseBundle \Repository \CDocumentRepository ;
@@ -126,6 +127,8 @@ public function getAllTemplates(
126127 throw new NotFoundHttpException ('Course not found ' );
127128 }
128129
130+ $ this ->denyAccessUnlessGranted (CourseVoter::VIEW , $ course );
131+
129132 $ languageFilterEnabled = $ this ->isSettingEnabled (
130133 $ settingsManager ->getSetting ('language.template_activate_language_filter ' , true )
131134 );
You can’t perform that action at this time.
0 commit comments