mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-11 09:35:00 +00:00
check if version modification is allowed
This commit is contained in:
parent
4e5bf5912f
commit
0e1571c6c8
|
@ -50,9 +50,14 @@ if (!is_object($content)) {
|
|||
UI::exitError(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))),getMLText("invalid_version"));
|
||||
}
|
||||
|
||||
// control for document state
|
||||
if(!$this->settings->_enableVersionModification) {
|
||||
UI::exitError(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))),getMLText("no_version_modification"));
|
||||
}
|
||||
|
||||
// control for document state. Must correspond to check in
|
||||
// SeedDMS_AccessOperation::maySetReviewersApprovers()
|
||||
$overallStatus = $content->getStatus();
|
||||
if ($overallStatus["status"]==S_REJECTED || $overallStatus["status"]==S_OBSOLETE ) {
|
||||
if ($overallStatus["status"]!=S_DRAFT_REV && $overallStatus["status"]!=S_DRAFT_APP) {
|
||||
UI::exitError(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))),getMLText("cannot_assign_invalid_state"));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user