Skip to content

Commit

Permalink
If document is hidden user can still have access. see BT#10817
Browse files Browse the repository at this point in the history
  • Loading branch information
jmontoyaa committed Feb 11, 2016
1 parent 8276d86 commit 4aaf4b2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions main/document/document.php
Expand Up @@ -680,17 +680,17 @@ function insertAtCarret() {

// Is the document tool visible?
// Check whether the tool is actually visible
$table_course_tool = Database::get_course_table(TABLE_TOOL_LIST);
/*$table_course_tool = Database::get_course_table(TABLE_TOOL_LIST);
$course_id = api_get_course_int_id();
$tool_sql = 'SELECT visibility FROM '.$table_course_tool.
' WHERE c_id = '.$course_id.' AND name = "'.TOOL_DOCUMENT.'" LIMIT 1';
$tool_result = Database::query($tool_sql);
$tool_row = Database::fetch_array($tool_result);
$tool_visibility = $tool_row['visibility'];

if ($tool_visibility == '0' && $groupId == '0' && !($is_allowed_to_edit || $group_member_with_upload_rights)) {
$tool_visibility = $tool_row['visibility'];*/
/*
if ($groupId == '0' && !($is_allowed_to_edit || $group_member_with_upload_rights)) {
api_not_allowed(true);
}
}*/

$htmlHeadXtra[] = '<script>
function confirmation (name) {
Expand Down

0 comments on commit 4aaf4b2

Please sign in to comment.