mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-12-04 13:23:33 +00:00
document must be readable to be reviewed or approved
This commit is contained in:
parent
64a7d341eb
commit
77474bdaee
|
|
@ -50,8 +50,7 @@ if (!is_object($document)) {
|
|||
UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id"));
|
||||
}
|
||||
|
||||
// verify if document may be approved
|
||||
if (!$accessop->mayApprove($document)){
|
||||
if ($document->getAccessMode($user) < M_READ) {
|
||||
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied"));
|
||||
}
|
||||
|
||||
|
|
@ -74,7 +73,10 @@ if ($latestContent->getVersion()!=$version) {
|
|||
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_version"));
|
||||
}
|
||||
|
||||
$olddocstatus = $content->getStatus();
|
||||
// verify if document may be approved
|
||||
if (!$accessop->mayApprove()){
|
||||
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied"));
|
||||
}
|
||||
|
||||
if (!isset($_POST["approvalStatus"]) || !is_numeric($_POST["approvalStatus"]) ||
|
||||
(intval($_POST["approvalStatus"])!=1 && intval($_POST["approvalStatus"])!=-1)) {
|
||||
|
|
@ -92,7 +94,7 @@ $controller->setParam('type', $_POST['approvalType']);
|
|||
$controller->setParam('status', $_POST['approvalStatus']);
|
||||
$controller->setParam('content', $latestContent);
|
||||
$controller->setParam('file', !empty($_FILES["approvalfile"]["tmp_name"]) ? $_FILES["approvalfile"]["tmp_name"] : '');
|
||||
$controller->setParam('group', !empty($_POST['approvalGroup']) ? $dms->getGroup($_POST['approvalGroup']) : null);
|
||||
$controller->setParam('group', !empty($_POST['approvalGroup']) ? $dms->getGroup($_POST['approvalGroup']) : null);
|
||||
if(!$controller()) {
|
||||
$err = $controller->getErrorMsg();
|
||||
if(is_string($err))
|
||||
|
|
|
|||
|
|
@ -50,8 +50,7 @@ if (!is_object($document)) {
|
|||
UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id"));
|
||||
}
|
||||
|
||||
// verify if document may be reviewed
|
||||
if (!$accessop->mayReview($document)){
|
||||
if ($document->getAccessMode($user) < M_READ) {
|
||||
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied"));
|
||||
}
|
||||
|
||||
|
|
@ -74,7 +73,10 @@ if ($latestContent->getVersion()!=$version) {
|
|||
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_version"));
|
||||
}
|
||||
|
||||
$olddocstatus = $content->getStatus();
|
||||
// verify if document may be reviewed
|
||||
if (!$accessop->mayReview()){
|
||||
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied"));
|
||||
}
|
||||
|
||||
if (!isset($_POST["reviewStatus"]) || !is_numeric($_POST["reviewStatus"]) ||
|
||||
(intval($_POST["reviewStatus"])!=1 && intval($_POST["reviewStatus"])!=-1)) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user