diff --git a/main/inc/ajax/myspace.ajax.php b/main/inc/ajax/myspace.ajax.php index 9f2c2d9341..0321346769 100755 --- a/main/inc/ajax/myspace.ajax.php +++ b/main/inc/ajax/myspace.ajax.php @@ -7,6 +7,14 @@ require_once __DIR__.'/../global.inc.php'; $action = $_GET['a']; +// Access restrictions. +$is_allowedToTrack = api_is_platform_admin(true, true) || + api_is_allowed_to_create_course() || api_is_course_tutor(); + +if (!$is_allowedToTrack) { + exit; +} + switch ($action) { // At this date : 23/02/2017, a minor review can't determine where is used this case 'access_detail' case 'access_detail': diff --git a/main/mySpace/access_details.php b/main/mySpace/access_details.php index 74c105c8a2..dc2d77d169 100755 --- a/main/mySpace/access_details.php +++ b/main/mySpace/access_details.php @@ -18,6 +18,17 @@ require_once __DIR__.'/../inc/global.inc.php'; api_block_anonymous_users(); + +// Access restrictions. +$is_allowedToTrack = api_is_platform_admin(true, true) || + api_is_allowed_to_create_course() || api_is_course_tutor(); + +if (!$is_allowedToTrack) { + api_not_allowed(true); + exit; +} + + // the section (for the tabs) $this_section = SECTION_TRACKING; diff --git a/main/mySpace/myStudents.php b/main/mySpace/myStudents.php index 776d9cbcc1..0c0832a4e9 100755 --- a/main/mySpace/myStudents.php +++ b/main/mySpace/myStudents.php @@ -74,6 +74,10 @@ if (!$allowedToTrackUser) { api_not_allowed(true); } +if (api_is_student()) { + api_not_allowed(true); +} + $htmlHeadXtra[] = '