mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-03-12 00:45:34 +00:00
Merge branch 'seeddms-5.1.x' into seeddms-6.0.x
This commit is contained in:
commit
8c4dc337c5
|
@ -30,6 +30,13 @@ include("../inc/inc.ClassUI.php");
|
||||||
include("../inc/inc.ClassAccessOperation.php");
|
include("../inc/inc.ClassAccessOperation.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("admin_tools"),getMLText("access_denied"), false, $isajax);
|
||||||
|
}
|
||||||
|
|
||||||
if (!isset($_GET["documentid"]) || !is_numeric($_GET["documentid"]) || intval($_GET["documentid"])<1) {
|
if (!isset($_GET["documentid"]) || !is_numeric($_GET["documentid"]) || intval($_GET["documentid"])<1) {
|
||||||
UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id"));
|
UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id"));
|
||||||
}
|
}
|
||||||
|
@ -38,6 +45,10 @@ if (!is_object($document)) {
|
||||||
UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id"));
|
UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!$accessop->mayEditComment($document)) {
|
||||||
|
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied"));
|
||||||
|
}
|
||||||
|
|
||||||
if($document->isLocked()) {
|
if($document->isLocked()) {
|
||||||
$lockingUser = $document->getLockingUser();
|
$lockingUser = $document->getLockingUser();
|
||||||
if (($lockingUser->getID() != $user->getID()) && ($document->getAccessMode($user) != M_ALL)) {
|
if (($lockingUser->getID() != $user->getID()) && ($document->getAccessMode($user) != M_ALL)) {
|
||||||
|
@ -52,14 +63,6 @@ if (!is_object($version)) {
|
||||||
|
|
||||||
$folder = $document->getFolder();
|
$folder = $document->getFolder();
|
||||||
|
|
||||||
/* Create object for checking access to certain operations */
|
|
||||||
$accessop = new SeedDMS_AccessOperation($dms, $user, $settings);
|
|
||||||
if(!$accessop->mayEditComment($document)) {
|
|
||||||
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied"));
|
|
||||||
}
|
|
||||||
|
|
||||||
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
|
|
||||||
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user));
|
|
||||||
if($view) {
|
if($view) {
|
||||||
$view->setParam('folder', $folder);
|
$view->setParam('folder', $folder);
|
||||||
$view->setParam('document', $document);
|
$view->setParam('document', $document);
|
||||||
|
|
|
@ -30,6 +30,13 @@ include("../inc/inc.ClassUI.php");
|
||||||
include("../inc/inc.ClassAccessOperation.php");
|
include("../inc/inc.ClassAccessOperation.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("admin_tools"),getMLText("access_denied"), false, $isajax);
|
||||||
|
}
|
||||||
|
|
||||||
if (!isset($_GET["documentid"]) || !is_numeric($_GET["documentid"]) || intval($_GET["documentid"])<1) {
|
if (!isset($_GET["documentid"]) || !is_numeric($_GET["documentid"]) || intval($_GET["documentid"])<1) {
|
||||||
UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id"));
|
UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id"));
|
||||||
}
|
}
|
||||||
|
@ -39,8 +46,8 @@ if (!is_object($document)) {
|
||||||
UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id"));
|
UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($document->getAccessMode($user) < M_ALL) {
|
if(!$accessop->maySetReviewersApprovers($document)) {
|
||||||
UI::exitError(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))),getMLText("access_denied"));
|
UI::exitError(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))),getMLText("no_version_modification"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isset($_GET["version"]) || !is_numeric($_GET["version"]) || intval($_GET["version"]<1)) {
|
if (!isset($_GET["version"]) || !is_numeric($_GET["version"]) || intval($_GET["version"]<1)) {
|
||||||
|
@ -54,14 +61,6 @@ if (!is_object($content)) {
|
||||||
|
|
||||||
$folder = $document->getFolder();
|
$folder = $document->getFolder();
|
||||||
|
|
||||||
/* Create object for checking access to certain operations */
|
|
||||||
$accessop = new SeedDMS_AccessOperation($dms, $user, $settings);
|
|
||||||
if(!$accessop->maySetReviewersApprovers($document)) {
|
|
||||||
UI::exitError(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))),getMLText("no_version_modification"));
|
|
||||||
}
|
|
||||||
|
|
||||||
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
|
|
||||||
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user));
|
|
||||||
if($view) {
|
if($view) {
|
||||||
$view->setParam('folder', $folder);
|
$view->setParam('folder', $folder);
|
||||||
$view->setParam('document', $document);
|
$view->setParam('document', $document);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user