check for access on op/op.Download.php in documentListRow()

This commit is contained in:
Uwe Steinmann 2016-08-11 13:25:01 +02:00
parent 17c9556337
commit 8916c83a8e

View File

@ -1942,6 +1942,7 @@ $(document).ready( function() {
$workflowmode = $this->params['workflowmode'];
$previewwidth = $this->params['previewWidthList'];
$enableClipboard = $this->params['enableclipboard'];
$accessop = $this->params['accessobject'];
$content = '';
@ -1979,12 +1980,14 @@ $(document).ready( function() {
$content .= "<td>";
if (file_exists($dms->contentDir . $latestContent->getPath())) {
if($accessop->check_controller_access('Download', array('action'=>'run')))
$content .= "<a draggable=\"false\" href=\"../op/op.Download.php?documentid=".$docID."&version=".$version."\">";
if($previewer->hasPreview($latestContent)) {
$content .= "<img draggable=\"false\" class=\"mimeicon\" width=\"".$previewwidth."\"src=\"../op/op.Preview.php?documentid=".$document->getID()."&version=".$latestContent->getVersion()."&width=".$previewwidth."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">";
} else {
$content .= "<img draggable=\"false\" class=\"mimeicon\" src=\"".$this->getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">";
}
if($accessop->check_controller_access('Download', array('action'=>'run')))
$content .= "</a>";
} else
$content .= "<img draggable=\"false\" class=\"mimeicon\" src=\"".$this->getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">";