allow status override if the new status is 'obsoleted'

This commit is contained in:
Uwe Steinmann 2019-08-17 08:00:06 +02:00
parent 65703c1862
commit 4b2b536fdb

View File

@ -59,7 +59,8 @@ if (!isset($_POST["overrideStatus"]) || !is_numeric($_POST["overrideStatus"]) ||
$overallStatus = $content->getStatus();
// status change control
// status change control, setting a status to obsolete is alwasy allowed
if(intval($_POST["overrideStatus"]) != S_OBSOLETE)
if ($overallStatus["status"] == S_REJECTED || $overallStatus["status"] == S_EXPIRED || $overallStatus["status"] == S_DRAFT_REV || $overallStatus["status"] == S_DRAFT_APP || $overallStatus["status"] == S_IN_WORKFLOW) {
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("cannot_change_final_states"));
}