diff --git a/main/admin/user_import.php b/main/admin/user_import.php index 971b7a2fbe..6a73897eb1 100644 --- a/main/admin/user_import.php +++ b/main/admin/user_import.php @@ -387,7 +387,7 @@ function parse_xml_data($file) } $this_section = SECTION_PLATFORM_ADMIN; -api_protect_admin_script(true, null, 'login'); +api_protect_admin_script(true, null); api_protect_limit_for_session_admin(); $defined_auth_sources[] = PLATFORM_AUTH_SOURCE; diff --git a/main/admin/user_update_import.php b/main/admin/user_update_import.php index eb11a8f94f..ae0728ddc9 100644 --- a/main/admin/user_update_import.php +++ b/main/admin/user_update_import.php @@ -337,7 +337,7 @@ function parse_xml_data($file) } $this_section = SECTION_PLATFORM_ADMIN; -api_protect_admin_script(true, null, 'login'); +api_protect_admin_script(true, null); $defined_auth_sources[] = PLATFORM_AUTH_SOURCE; diff --git a/main/course_info/maintenance.php b/main/course_info/maintenance.php index aa31f1fbf0..359754a71d 100755 --- a/main/course_info/maintenance.php +++ b/main/course_info/maintenance.php @@ -13,7 +13,12 @@ $nameTools = get_lang('Maintenance'); api_protect_course_script(true); api_block_anonymous_users(); -Display :: display_header($nameTools); +// Check access rights (only teachers are allowed here) +if (!api_is_allowed_to_edit()) { + api_not_allowed(true); +} + +Display::display_header($nameTools); echo Display::page_header($nameTools); ?> @@ -46,5 +51,5 @@ echo Display::page_header($nameTools);
"exercise.php", "name" => get_lang('Exercises')]; diff --git a/main/work/work.php b/main/work/work.php index fba382fe22..09dde751db 100755 --- a/main/work/work.php +++ b/main/work/work.php @@ -157,6 +157,11 @@ switch ($action) { header('Location: '.$currentUrl); exit; } + + if (!$is_allowed_to_edit) { + api_not_allowed(true); + } + $studentDeleteOwnPublication = api_get_course_setting('student_delete_own_publication') == 1 ? 1 : 0; /* Display of tool options */ $content = settingsForm(