mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-06-18 02:59:27 +00:00
check for access on Download and ViewOnline
This commit is contained in:
parent
8916c83a8e
commit
20f5bd6489
|
@ -42,6 +42,7 @@ class SeedDMS_View_DocumentVersionDetail extends SeedDMS_Bootstrap_Style {
|
|||
$folder = $this->params['folder'];
|
||||
$document = $this->params['document'];
|
||||
$version = $this->params['version'];
|
||||
$accessop = $this->params['accessobject'];
|
||||
$viewonlinefiletypes = $this->params['viewonlinefiletypes'];
|
||||
$enableversionmodification = $this->params['enableversionmodification'];
|
||||
$cachedir = $this->params['cachedir'];
|
||||
|
@ -188,9 +189,11 @@ class SeedDMS_View_DocumentVersionDetail extends SeedDMS_Bootstrap_Style {
|
|||
//if (($document->getAccessMode($user) >= M_READWRITE)) {
|
||||
print "<ul class=\"actions unstyled\">";
|
||||
if ($file_exists){
|
||||
print "<li><a href=\"../op/op.Download.php?documentid=".$document->getID()."&version=".$version->getVersion()."\" title=\"".htmlspecialchars($version->getMimeType())."\"><i class=\"icon-download\"></i> ".getMLText("download")."</a>";
|
||||
if($accessop->check_controller_access('Download', array('action'=>'run')))
|
||||
print "<li><a href=\"../op/op.Download.php?documentid=".$document->getID()."&version=".$version->getVersion()."\" title=\"".htmlspecialchars($version->getMimeType())."\"><i class=\"icon-download\"></i> ".getMLText("download")."</a>";
|
||||
if ($viewonlinefiletypes && in_array(strtolower($version->getFileType()), $viewonlinefiletypes))
|
||||
print "<li><a target=\"_blank\" href=\"../op/op.ViewOnline.php?documentid=".$document->getID()."&version=".$version->getVersion()."\"><i class=\"icon-star\"></i> " . getMLText("view_online") . "</a>";
|
||||
if($accessop->check_controller_access('ViewOnline', array('action'=>'run')))
|
||||
print "<li><a target=\"_blank\" href=\"../op/op.ViewOnline.php?documentid=".$document->getID()."&version=".$version->getVersion()."\"><i class=\"icon-star\"></i> " . getMLText("view_online") . "</a>";
|
||||
print "</ul>";
|
||||
print "<ul class=\"actions unstyled\">";
|
||||
}
|
||||
|
@ -362,6 +365,7 @@ class SeedDMS_View_DocumentVersionDetail extends SeedDMS_Bootstrap_Style {
|
|||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
$this->contentEnd();
|
||||
$this->htmlEndPage();
|
||||
|
|
Loading…
Reference in New Issue
Block a user