mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-06-01 06:27:15 +00:00
add method maySetReviser
This commit is contained in:
parent
0addaf56d3
commit
df75ae5c8c
|
@ -111,7 +111,7 @@ class SeedDMS_AccessOperation {
|
||||||
* This check can only be done for documents. Setting the document
|
* This check can only be done for documents. Setting the document
|
||||||
* recipients is only allowed if version modification is turned on
|
* recipients is only allowed if version modification is turned on
|
||||||
* in the settings. The
|
* in the settings. The
|
||||||
* admin may even set reviewers/approvers if is disallowed in the
|
* admin may even set recipients if is disallowed in the
|
||||||
* settings.
|
* settings.
|
||||||
*/
|
*/
|
||||||
function maySetRecipients() { /* {{{ */
|
function maySetRecipients() { /* {{{ */
|
||||||
|
@ -125,6 +125,26 @@ class SeedDMS_AccessOperation {
|
||||||
return false;
|
return false;
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if revisers may be edited
|
||||||
|
*
|
||||||
|
* This check can only be done for documents. Setting the document
|
||||||
|
* revisers is only allowed if version modification is turned on
|
||||||
|
* in the settings. The
|
||||||
|
* admin may even set revisers if is disallowed in the
|
||||||
|
* settings.
|
||||||
|
*/
|
||||||
|
function maySetRevisers() { /* {{{ */
|
||||||
|
if(get_class($this->obj) == 'SeedDMS_Core_Document') {
|
||||||
|
$latestContent = $this->obj->getLatestContent();
|
||||||
|
$status = $latestContent->getStatus();
|
||||||
|
if ((($this->settings->_enableVersionModification && ($this->obj->getAccessMode($this->user) == M_ALL)) || $this->user->isAdmin()) && ($status["status"]==S_RELEASED || $status["status"]==S_EXPIRED)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
} /* }}} */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if workflow may be edited
|
* Check if workflow may be edited
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue
Block a user