mayApprove() checks if document is in review

This commit is contained in:
Uwe Steinmann 2015-06-15 08:53:39 +02:00
parent 418da4cb52
commit b69f91cf12

View File

@ -211,14 +211,15 @@ class SeedDMS_AccessOperation {
* Check if document content may be approved * Check if document content may be approved
* *
* Approving a document content is only allowed if the document was not * Approving a document content is only allowed if the document was not
* obsoleted. There are other requirements which are not taken into * obsoleted and the document is not in review status.
* There are other requirements which are not taken into
* account here. * account here.
*/ */
function mayApprove() { /* {{{ */ function mayApprove() { /* {{{ */
if(get_class($this->obj) == 'SeedDMS_Core_Document') { if(get_class($this->obj) == 'SeedDMS_Core_Document') {
$latestContent = $this->obj->getLatestContent(); $latestContent = $this->obj->getLatestContent();
$status = $latestContent->getStatus(); $status = $latestContent->getStatus();
if ($status["status"]!=S_OBSOLETE) { if ($status["status"]!=S_OBSOLETE && $status["status"]!=S_DRAFT_REV) {
return true; return true;
} }
} }