mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-06 15:14:58 +00:00
add access check
This commit is contained in:
parent
a1ccc60729
commit
e272d26f30
|
@ -27,6 +27,13 @@ include("../inc/inc.DBInit.php");
|
|||
include("../inc/inc.ClassUI.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("admin_tools"),getMLText("access_denied"));
|
||||
}
|
||||
|
||||
$workflow = $dms->getWorkflow($_GET['workflow']);
|
||||
if (is_bool($workflow)) {
|
||||
UI::exitError(getMLText("admin_tools"),getMLText("internal_error"));
|
||||
|
@ -50,12 +57,11 @@ if(isset($_GET['transitions']) && $_GET['transitions']) {
|
|||
}
|
||||
}
|
||||
|
||||
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
|
||||
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user));
|
||||
if($view) {
|
||||
$view->setParam('workflow', $workflow);
|
||||
$view->setParam('transitions', $transitions);
|
||||
$view->setParam('document', $document);
|
||||
$view->setParam('accessobject', $accessop);
|
||||
$view($_GET);
|
||||
exit;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user