* [bug#63488,done,0.5h] fix check priv.

This commit is contained in:
tianshujie
2025-06-19 16:13:35 +08:00
parent 64b1c2a164
commit e1b09adf4d
+2 -1
View File
@@ -1205,11 +1205,12 @@ class fileModel extends model
$fileTitleLink = common::hasPriv('file', 'download') ? html::a($downloadLink, $fileTitle . " <span class='text-gray'>({$fileSize})</span>", '_blank', "id='fileTitle$file->id'") : "<div id='fileTitle$file->id' style='display: inline-block'>" . $fileTitle . " <span class='text-gray'>({$fileSize})</span></div>";
$objectType = zget($this->config->file->objectType, $file->objectType);
$viewMethod = $objectType == 'feedback' && $this->config->vision != 'lite' ? 'adminView' : 'view';
$html .= "<li class='mb-2 file' title='{$uploadDate}'>" . $fileTitleLink;
if(strpos('view,edit', $method) !== false)
{
if(common::hasPriv($objectType, 'view', $object)) $html = $this->buildFileActions($html, $downloadLink, $imageWidth, $showEdit, $showDelete, $file, $object);
if(common::hasPriv($objectType, $viewMethod, $object)) $html = $this->buildFileActions($html, $downloadLink, $imageWidth, $showEdit, $showDelete, $file, $object);
}
else
{