mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-06-07 21:59:22 +00:00
check if document may be checked in
This commit is contained in:
parent
7ae5749bcf
commit
00fe788571
|
@ -26,6 +26,8 @@ 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");
|
||||||
|
|
||||||
|
$accessop = new SeedDMS_AccessOperation($dms, $user, $settings);
|
||||||
|
|
||||||
/* Check if the form data comes from a trusted request */
|
/* Check if the form data comes from a trusted request */
|
||||||
if(!checkFormKey('checkindocument')) {
|
if(!checkFormKey('checkindocument')) {
|
||||||
UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_request_token"))),getMLText("invalid_request_token"));
|
UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_request_token"))),getMLText("invalid_request_token"));
|
||||||
|
@ -62,6 +64,10 @@ if ($document->isLocked()) {
|
||||||
else $document->setLocked(false);
|
else $document->setLocked(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!$accessop->mayCheckIn($document)) {
|
||||||
|
UI::exitError(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))),getMLText("access_denied"));
|
||||||
|
}
|
||||||
|
|
||||||
if(isset($_POST["comment"]))
|
if(isset($_POST["comment"]))
|
||||||
$comment = $_POST["comment"];
|
$comment = $_POST["comment"];
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue
Block a user