mirror of
				https://github.com/librenms/librenms.git
				synced 2024-10-07 16:52:45 +00:00 
			
		
		
		
	fix users being able to view ports they are allowed to view, when not allowed to view the device
git-svn-id: http://www.observium.org/svn/observer/trunk@2145 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
		| @@ -2,7 +2,7 @@ | |||||||
|  |  | ||||||
| if ($_GET['id']) { $_GET['id'] = mres($_GET['id']); } | if ($_GET['id']) { $_GET['id'] = mres($_GET['id']); } | ||||||
|  |  | ||||||
| if ($_GET['section'] == "interface" && is_numeric($_GET['opta']) && port_permitted($_GET['opta'])) | if ($_GET['section'] == "port" && is_numeric($_GET['opta']) && port_permitted($_GET['opta'])) | ||||||
| { | { | ||||||
|   $check_device = get_device_id_by_interface_id($_GET['opta']); |   $check_device = get_device_id_by_interface_id($_GET['opta']); | ||||||
|   $permit_ports = 1; |   $permit_ports = 1; | ||||||
| @@ -264,18 +264,18 @@ if (device_permitted($_GET['id']) || $check_device == $_GET['id']) | |||||||
|     </a> |     </a> | ||||||
|   </li>'); |   </li>'); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     echo("</ul>"); |     echo("</ul>"); | ||||||
|  |   } | ||||||
|  |  | ||||||
|  |   if(device_permitted($device['device_id']) || $check_device == $_GET['id']) { | ||||||
|     echo('<div class="contentstyle">'); |     echo('<div class="contentstyle">'); | ||||||
|  |  | ||||||
|     include("pages/device/".mres(basename($section)).".inc.php"); |     include("pages/device/".mres(basename($section)).".inc.php"); | ||||||
|  |  | ||||||
|     echo("</div>"); |     echo("</div>"); | ||||||
|  |   } else { | ||||||
|  |     include("includes/error-no-perm.inc.php"); | ||||||
|   } |   } | ||||||
| } | } | ||||||
| else |  | ||||||
| { |  | ||||||
|   include("includes/error-no-perm.inc.php"); |  | ||||||
| } |  | ||||||
|  |  | ||||||
| ?> | ?> | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user