Skip to content

Commit

Permalink
Work: Fix display warning message of protected Document - refs BT#20589
Browse files Browse the repository at this point in the history
  • Loading branch information
cfasanando committed Mar 7, 2023
1 parent 249d933 commit bcb95c7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions main/document/showinframes.php
Expand Up @@ -255,6 +255,12 @@
Display::display_header();
}

if (!$is_allowed_to_edit && !$is_visible) {
echo Display::return_message(get_lang('ProtectedDocument'), 'warning');
Display::display_footer();
exit;
}

$file_url = api_get_path(WEB_COURSE_PATH).$courseInfo['path'].'/document'.$header_file;
$file_url_web = $file_url.'?'.api_get_cidreq();
if ($playerSupported) {
Expand Down

0 comments on commit bcb95c7

Please sign in to comment.