diff --git a/main/document/document.php b/main/document/document.php
index ce2674f4bf..1c85bc5fe8 100644
--- a/main/document/document.php
+++ b/main/document/document.php
@@ -1163,7 +1163,9 @@ if ($image_present && !isset($_GET['keyword'])) {
echo '' . Display::return_icon('slideshow.png', get_lang('ViewSlideshow'), '', ICON_SIZE_MEDIUM) . '';
}
-echo '' . Display::return_icon('percentage.png', get_lang('DocumentQuota'), '', ICON_SIZE_MEDIUM) . '';
+if (api_is_allowed_to_edit(null, true)) {
+ echo '' . Display::return_icon('percentage.png', get_lang('DocumentQuota'), '', ICON_SIZE_MEDIUM) . '';
+}
echo ''; //end actions
diff --git a/main/document/document_quota.php b/main/document/document_quota.php
index 85f6766c03..36c8b6591e 100644
--- a/main/document/document_quota.php
+++ b/main/document/document_quota.php
@@ -6,6 +6,10 @@ require_once '../inc/global.inc.php';
require_once api_get_path(LIBRARY_PATH).'fileDisplay.lib.php';
+if (!api_is_allowed_to_edit(null, true)) {
+ api_not_allowed(true);
+}
+
$current_course_tool = TOOL_DOCUMENT;
$this_section = SECTION_COURSES;