diff --git a/views/bootstrap/class.CheckInDocument.php b/views/bootstrap/class.CheckInDocument.php index 154311499..62c96d2a8 100644 --- a/views/bootstrap/class.CheckInDocument.php +++ b/views/bootstrap/class.CheckInDocument.php @@ -104,6 +104,21 @@ $(document).ready(function() { print ""; } + $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) {