fix access checking

This commit is contained in:
Uwe Steinmann 2016-05-30 20:41:36 +02:00
parent 21b053cd0d
commit 1544912dbc

View File

@ -27,14 +27,16 @@ include("../inc/inc.DBInit.php");
include("../inc/inc.Authentication.php");
include("../inc/inc.ClassUI.php");
if (!$user->isAdmin()) {
$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"));
}
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user));
if($view) {
$view->setParam('cachedir', $settings->_cacheDir);
$view->setParam('accessobject', $accessop);
$view($_GET);
exit;
}