construct SeedDMS_AccessOperation after document is known

This commit is contained in:
Uwe Steinmann 2020-03-26 07:53:48 +01:00
parent 06876a84b8
commit 3efdac7197

View File

@ -33,7 +33,6 @@ require_once("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, $document, $user, $settings);
if (!$user->isAdmin()) {
UI::exitError(getMLText("admin_tools"),getMLText("access_denied"));
}
@ -63,6 +62,7 @@ if (!is_object($workflow)) {
UI::exitError(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))),getMLText("document_has_no_workflow"));
}
$accessop = new SeedDMS_AccessOperation($dms, $document, $user, $settings);
$folder = $document->getFolder();
if($view) {