diff --git a/module/file/view/viewfiles.html.php b/module/file/view/viewfiles.html.php
index d30adebb03..2668b72ede 100644
--- a/module/file/view/viewfiles.html.php
+++ b/module/file/view/viewfiles.html.php
@@ -188,7 +188,7 @@ function setFileName(fileID)
echo "
" . html::a($downloadLink, $fileTitle . " ({$fileSize})", '_blank', "id='fileTitle$file->id' onclick=\"return downloadFile($file->id, '$file->extension', $imageWidth, '$file->title')\"");
$objectType = zget($this->config->file->objectType, $file->objectType);
- if(common::hasPriv($objectType, 'edit', $object))
+ if(common::hasPriv($objectType, 'view', $object))
{
echo " ";
@@ -218,8 +218,11 @@ function setFileName(fileID)
}
common::printLink('file', 'download', "fileID=$file->id", "", '_blank', "class='fileAction btn btn-link text-primary' title='{$lang->file->downloadFile}'");
- if(common::hasPriv('file', 'edit')) echo html::a('###', "", '', "id='renameFile$file->id' class='fileAction btn btn-link edit text-primary' onclick='showRenameBox($file->id)' title='{$lang->file->edit}'");
- if($showDelete and common::hasPriv('file', 'delete')) echo html::a('###', "", '', "class='fileAction btn btn-link text-primary' onclick='deleteFile($file->id, this)' title='$lang->delete'");
+ if(common::hasPriv($objectType, 'edit', $object))
+ {
+ if(common::hasPriv('file', 'edit')) echo html::a('###', "", '', "id='renameFile$file->id' class='fileAction btn btn-link edit text-primary' onclick='showRenameBox($file->id)' title='{$lang->file->edit}'");
+ if($showDelete and common::hasPriv('file', 'delete')) echo html::a('###', "", '', "class='fileAction btn btn-link text-primary' onclick='deleteFile($file->id, this)' title='$lang->delete'");
+ }
echo '';
}
echo '';?>