mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-09 13:06:14 +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
|
* 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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user