mirror of
				https://git.code.sf.net/p/seeddms/code
				synced 2025-10-31 05:11:27 +00:00 
			
		
		
		
	add access check for download in documentListRow()
This commit is contained in:
		
							parent
							
								
									dc2edaca25
								
							
						
					
					
						commit
						4266e426db
					
				|  | @ -1630,6 +1630,7 @@ $(function() { | |||
| 	function mainClipboard($clipboard, $previewer){ /* {{{ */ | ||||
| 		$dms = $this->params['dms']; | ||||
| 		$user = $this->params['user']; | ||||
| 		$accessop = $this->params['accessobject']; | ||||
| 		$content = ''; | ||||
| 		$foldercount = $doccount = 0; | ||||
| 		if($clipboard['folders']) { | ||||
|  | @ -1667,13 +1668,17 @@ $(function() { | |||
| 						$content .= "<tr draggable=\"true\" rel=\"document_".$docid."\" class=\"table-row-document\" formtoken=\"".createFormKey('movedocument')."\">"; | ||||
| 
 | ||||
| 						if (file_exists($dms->contentDir . $latestContent->getPath())) { | ||||
| 							$content .= "<td><a draggable=\"false\" href=\"../op/op.Download.php?documentid=".$docid."&version=".$version."\">"; | ||||
| 							$content .= "<td>"; | ||||
| 							if($accessop->check_controller_access('Download', array('action'=>'version'))) | ||||
| 								$content .= "<a draggable=\"false\" href=\"../op/op.Download.php?documentid=".$docid."&version=".$version."\">"; | ||||
| 							if($previewer->hasPreview($latestContent)) { | ||||
| 								$content .= "<img draggable=\"false\" class=\"mimeicon\" width=\"40\"src=\"../op/op.Preview.php?documentid=".$document->getID()."&version=".$latestContent->getVersion()."&width=40\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">"; | ||||
| 							} else { | ||||
| 								$content .= "<img draggable=\"false\" class=\"mimeicon\" src=\"".$this->getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">"; | ||||
| 							} | ||||
| 							$content .= "</a></td>"; | ||||
| 							if($accessop->check_controller_access('Download', array('action'=>'version'))) | ||||
| 								$content .= "</a>"; | ||||
| 							$content .= "</td>"; | ||||
| 						} else | ||||
| 							$content .= "<td><img draggable=\"false\" class=\"mimeicon\" src=\"".$this->getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\"></td>"; | ||||
| 						 | ||||
|  | @ -1980,7 +1985,7 @@ $(document).ready( function() { | |||
| 
 | ||||
| 			$content .= "<td>"; | ||||
| 			if (file_exists($dms->contentDir . $latestContent->getPath())) { | ||||
| 				if($accessop->check_controller_access('Download', array('action'=>'run'))) | ||||
| 				if($accessop->check_controller_access('Download', array('action'=>'version'))) | ||||
| 					$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())."\">"; | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Uwe Steinmann
						Uwe Steinmann