From d682802f586d1da7a737b98ea5be045f52369976 Mon Sep 17 00:00:00 2001 From: mrey Date: Fri, 2 Jun 2017 14:23:09 +0200 Subject: [PATCH] Disable view of Git Import when user is professor of course but not staff user Reason: Before this fix, if the user is not staff (user.is_staff=0) and ENABLE_SYSADMIN_DASHBOARD=True happens that the user can access the Git Import in Sysadmin dashboard and get to see the links in the menu of the sysadmin dashboard (Users, Courses, Staffing and enrollment). When this user clicks on one of these links, it gets an error from the server. --- .../instructor/instructor_dashboard_2/course_info.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lms/templates/instructor/instructor_dashboard_2/course_info.html b/lms/templates/instructor/instructor_dashboard_2/course_info.html index 7cdcbe7c7f..bed2cb916e 100644 --- a/lms/templates/instructor/instructor_dashboard_2/course_info.html +++ b/lms/templates/instructor/instructor_dashboard_2/course_info.html @@ -104,7 +104,7 @@ from openedx.core.djangolib.markup import HTML, Text - %if settings.FEATURES.get('ENABLE_SYSADMIN_DASHBOARD', ''): + %if settings.FEATURES.get('ENABLE_SYSADMIN_DASHBOARD', '') and user.is_staff:

## Translators: git is a version-control system; see http://git-scm.com/about ${Text(_("View detailed Git import logs for this course {link_start}by clicking here{link_end}.")).format(