mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-11-26 15:32:13 +00:00
pass access object to view
This commit is contained in:
parent
3ebfd7aacf
commit
1ef5cb0444
|
@ -23,6 +23,7 @@ include("../inc/inc.Utils.php");
|
|||
include("../inc/inc.DBInit.php");
|
||||
include("../inc/inc.Language.php");
|
||||
include("../inc/inc.ClassUI.php");
|
||||
include("../inc/inc.ClassAccessOperation.php");
|
||||
include("../inc/inc.Authentication.php");
|
||||
|
||||
if (!isset($_GET["documentid"]) || !is_numeric($_GET["documentid"]) || intval($_GET["documentid"]<1)) {
|
||||
|
@ -41,9 +42,13 @@ if ($document->getAccessMode($user) < M_READWRITE) {
|
|||
UI::exitError(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))),getMLText("access_denied"));
|
||||
}
|
||||
|
||||
/* Create object for checking access to certain operations */
|
||||
$accessop = new SeedDMS_AccessOperation($document, $user, $settings);
|
||||
|
||||
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
|
||||
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'folder'=>$folder, 'document'=>$document, 'strictformcheck'=>$settings->_strictFormCheck, 'enablelargefileupload'=>$settings->_enableLargeFileUpload));
|
||||
if($view) {
|
||||
$view->setParam('accessobject', $accessop);
|
||||
$view->show();
|
||||
exit;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user