mirror of
				https://git.code.sf.net/p/seeddms/code
				synced 2025-10-31 05:11:27 +00:00 
			
		
		
		
	set access object
This commit is contained in:
		
							parent
							
								
									400755a0e0
								
							
						
					
					
						commit
						ac0824ae37
					
				|  | @ -20,6 +20,7 @@ | |||
| 
 | ||||
| if(!isset($settings)) | ||||
| 	require_once("../inc/inc.Settings.php"); | ||||
| require_once("inc/inc.LogInit.php"); | ||||
| require_once("inc/inc.Language.php"); | ||||
| require_once("inc/inc.Init.php"); | ||||
| require_once("inc/inc.Extension.php"); | ||||
|  | @ -27,8 +28,11 @@ require_once("inc/inc.DBInit.php"); | |||
| require_once("inc/inc.ClassUI.php"); | ||||
| require_once("inc/inc.Authentication.php"); | ||||
| 
 | ||||
| if (!$user->isAdmin()) { | ||||
| 	UI::exitError(getMLText("admin_tools"),getMLText("access_denied")); | ||||
| $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); | ||||
| $view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user)); | ||||
| $accessop = new SeedDMS_AccessOperation($dms, $user, $settings); | ||||
| if (!$accessop->check_view_access($view, $_GET)) { | ||||
| 	UI::exitError(getMLText("admin_tools"),getMLText("access_denied"), false, $isajax); | ||||
| } | ||||
| 
 | ||||
| if (!isset($_GET["userid"]) || !is_numeric($_GET["userid"]) || intval($_GET["userid"])<1) { | ||||
|  | @ -46,11 +50,10 @@ if ($rmuser->getID()==$user->getID()) { | |||
| 
 | ||||
| $allusers = $dms->getAllUsers($settings->_sortUsersInList); | ||||
| 
 | ||||
| $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); | ||||
| $view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user)); | ||||
| if($view) { | ||||
| 	$view->setParam('rmuser', $rmuser); | ||||
| 	$view->setParam('allusers', $allusers); | ||||
| 	$view->setParam('accessobject', $accessop); | ||||
| 	$view($_GET); | ||||
| 	exit; | ||||
| } | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Uwe Steinmann
						Uwe Steinmann