mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-03-12 00:45:34 +00:00
mayApprove() checks if document is in review
This commit is contained in:
parent
cc9f40997b
commit
d02c06a87f
|
@ -211,14 +211,15 @@ class SeedDMS_AccessOperation {
|
|||
* Check if document content may be approved
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
function mayApprove() { /* {{{ */
|
||||
if(get_class($this->obj) == 'SeedDMS_Core_Document') {
|
||||
$latestContent = $this->obj->getLatestContent();
|
||||
$status = $latestContent->getStatus();
|
||||
if ($status["status"]!=S_OBSOLETE) {
|
||||
if ($status["status"]!=S_OBSOLETE && $status["status"]!=S_DRAFT_REV) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user