mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-06-01 14:37:20 +00:00
add mayReceipt()
This commit is contained in:
parent
d8df113676
commit
d12f9993dd
|
@ -138,7 +138,7 @@ class SeedDMS_AccessOperation {
|
||||||
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 ((($this->settings->_enableVersionModification && ($this->obj->getAccessMode($this->user) == M_ALL)) || $this->user->isAdmin()) && ($status["status"]==S_RELEASED || $status["status"]==S_IN_REVISION)) {
|
if ((($this->settings->_enableVersionModification && ($this->obj->getAccessMode($this->user) == M_ALL)) || $this->user->isAdmin()) /* && ($status["status"]==S_RELEASED || $status["status"]==S_IN_REVISION)*/) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -266,6 +266,24 @@ class SeedDMS_AccessOperation {
|
||||||
return false;
|
return false;
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if document content may be receipted
|
||||||
|
*
|
||||||
|
* Reviewing a document content is only allowed if the document was not
|
||||||
|
* obsoleted. There are other requirements which are not taken into
|
||||||
|
* account here.
|
||||||
|
*/
|
||||||
|
function mayReceipt() { /* {{{ */
|
||||||
|
if(get_class($this->obj) == 'SeedDMS_Core_Document') {
|
||||||
|
$latestContent = $this->obj->getLatestContent();
|
||||||
|
$status = $latestContent->getStatus();
|
||||||
|
if ($status["status"]!=S_OBSOLETE) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
} /* }}} */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if document content may be revised
|
* Check if document content may be revised
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue
Block a user