mirror of
				https://git.code.sf.net/p/seeddms/code
				synced 2025-10-31 13:18:06 +00:00 
			
		
		
		
	add role based access check
This commit is contained in:
		
							parent
							
								
									9a20306399
								
							
						
					
					
						commit
						f2ffca8096
					
				|  | @ -32,9 +32,10 @@ require_once("class.Bootstrap.php"); | |||
| class SeedDMS_View_LogManagement extends SeedDMS_Bootstrap_Style { | ||||
| 
 | ||||
| 	function filelist($entries, $mode) { /* {{{ */ | ||||
| 		$accessop = $this->params['accessobject']; | ||||
| 		$print_header = true; | ||||
| 		foreach ($entries as $entry){ | ||||
| 			 | ||||
| 
 | ||||
| 			if ($print_header){ | ||||
| 				print "<form action=\"out.RemoveLog.php\" method=\"get\">\n"; | ||||
| 				print "<table class=\"table-condensed\">\n"; | ||||
|  | @ -47,7 +48,7 @@ class SeedDMS_View_LogManagement extends SeedDMS_Bootstrap_Style { | |||
| 				print "</tr>\n</thead>\n<tbody>\n"; | ||||
| 				$print_header=false; | ||||
| 			} | ||||
| 					 | ||||
| 
 | ||||
| 			print "<tr>\n"; | ||||
| 			print "<td><input type=\"checkbox\" name=\"logname[]\" value=\"".$entry."\"/></td>\n"; | ||||
| 			print "<td><a href=\"out.LogManagement.php?logname=".$entry."\">".$entry."</a></td>\n"; | ||||
|  | @ -55,13 +56,17 @@ class SeedDMS_View_LogManagement extends SeedDMS_Bootstrap_Style { | |||
| 			print "<td>".getLongReadableDate(filectime($this->contentdir.$entry))."</td>\n"; | ||||
| 			print "<td>".SeedDMS_Core_File::format_filesize(filesize($this->contentdir.$entry))."</td>\n"; | ||||
| 			print "<td>"; | ||||
| 			 | ||||
| 			print "<a href=\"out.RemoveLog.php?mode=".$mode."&logname=".$entry."\" class=\"btn btn-mini\"><i class=\"icon-remove\"></i> ".getMLText("rm_file")."</a>"; | ||||
| 			print " "; | ||||
| 			print "<a href=\"../op/op.Download.php?logname=".$entry."\" class=\"btn btn-mini\"><i class=\"icon-download\"></i> ".getMLText("download")."</a>"; | ||||
| 
 | ||||
| 			if($accessop->check_view_access('RemoveLog')) { | ||||
| 				print "<a href=\"out.RemoveLog.php?mode=".$mode."&logname=".$entry."\" class=\"btn btn-mini\"><i class=\"icon-remove\"></i> ".getMLText("rm_file")."</a>"; | ||||
| 			} | ||||
| 			if($accessop->check_controller_access('Download', array('action'=>'log'))) { | ||||
| 				print " "; | ||||
| 				print "<a href=\"../op/op.Download.php?logname=".$entry."\" class=\"btn btn-mini\"><i class=\"icon-download\"></i> ".getMLText("download")."</a>"; | ||||
| 			} | ||||
| 			print " "; | ||||
| 			print "<a data-target=\"#logViewer\" data-cache=\"false\" href=\"out.LogManagement.php?logname=".$entry."\" role=\"button\" class=\"btn btn-mini\" data-toggle=\"modal\"><i class=\"icon-eye-open\"></i> ".getMLText('view')." …</a>"; | ||||
| 			print "</td>\n";	 | ||||
| 			print "</td>\n"; | ||||
| 			print "</tr>\n"; | ||||
| 		} | ||||
| 
 | ||||
|  | @ -79,13 +84,14 @@ $(document).ready( function() { | |||
| 		$('input[type=checkbox]').prop('checked', true); | ||||
| 	}); | ||||
| 
 | ||||
| });		 | ||||
| }); | ||||
| <?php | ||||
| 	} /* }}} */ | ||||
| 
 | ||||
| 	function show() { /* {{{ */ | ||||
| 		$dms = $this->params['dms']; | ||||
| 		$user = $this->params['user']; | ||||
| 		$accessop = $this->params['accessobject']; | ||||
| 		$this->contentdir = $this->params['contentdir']; | ||||
| 		$logname = $this->params['logname']; | ||||
| 		$mode = $this->params['mode']; | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Uwe Steinmann
						Uwe Steinmann