mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-16 14:41:39 +00:00
check access
This commit is contained in:
parent
36b51b64b1
commit
5895a6685a
|
@ -28,6 +28,13 @@ include("../inc/inc.DBInit.php");
|
||||||
include("../inc/inc.ClassUI.php");
|
include("../inc/inc.ClassUI.php");
|
||||||
include("../inc/inc.Authentication.php");
|
include("../inc/inc.Authentication.php");
|
||||||
|
|
||||||
|
$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("my_documents"),getMLText("access_denied"));
|
||||||
|
}
|
||||||
|
|
||||||
if ($user->isGuest()) {
|
if ($user->isGuest()) {
|
||||||
UI::exitError(getMLText("expired_documents"),getMLText("access_denied"));
|
UI::exitError(getMLText("expired_documents"),getMLText("access_denied"));
|
||||||
}
|
}
|
||||||
|
@ -37,13 +44,12 @@ if (isset($_GET["orderby"]) && strlen($_GET["orderby"])==1 ) {
|
||||||
$orderby=$_GET["orderby"];
|
$orderby=$_GET["orderby"];
|
||||||
}
|
}
|
||||||
|
|
||||||
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
|
|
||||||
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user));
|
|
||||||
if($view) {
|
if($view) {
|
||||||
$view->setParam('orderby', $orderby);
|
$view->setParam('orderby', $orderby);
|
||||||
$view->setParam('cachedir', $settings->_cacheDir);
|
$view->setParam('cachedir', $settings->_cacheDir);
|
||||||
$view->setParam('previewWidthList', $settings->_previewWidthList);
|
$view->setParam('previewWidthList', $settings->_previewWidthList);
|
||||||
$view->setParam('timeout', $settings->_cmdTimeout);
|
$view->setParam('timeout', $settings->_cmdTimeout);
|
||||||
|
$view->setParam('accessobject', $accessop);
|
||||||
$view($_GET);
|
$view($_GET);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user