show message if document may not be checked in

This commit is contained in:
Uwe Steinmann 2023-03-13 10:23:36 +01:00
parent 67d6191024
commit a7579f47ae

View File

@ -104,6 +104,21 @@ $(document).ready(function() {
print "</div>";
}
$checkoutinfo = $document->getCheckOutInfo();
if(!$checkoutinfo) {
$this->errorMsg(getMLText('error_occured'));
$this->contentEnd();
$this->htmlEndPage();
exit;
}
$info = $checkoutinfo[0];
if($user->getID() != $info['userID'] && $document->getAccessMode($user) < M_ALL) {
$this->errorMsg(getMLText('access_denied'));
$this->contentEnd();
$this->htmlEndPage();
exit;
}
if ($checkoutstatus = $document->checkOutStatus()) {
switch($checkoutstatus) {
case 1:
@ -117,7 +132,6 @@ $(document).ready(function() {
break;
}
}
$checkoutinfo = $document->getCheckOutInfo();
$this->rowStart();
if($checkoutstatus == 0) {