mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-06 15:14:58 +00:00
fixed comment
This commit is contained in:
parent
827ab205ea
commit
c603feada9
|
@ -91,7 +91,7 @@ class LetoDMS_AccessOperation {
|
||||||
* This check can only be done for documents. Overwriting the document
|
* This check can only be done for documents. Overwriting the document
|
||||||
* reviewers/approvers is only allowed if version modification is turned on
|
* reviewers/approvers is only allowed if version modification is turned on
|
||||||
* in the settings and the document is in 'draft review' status. The
|
* in the settings and the document is in 'draft review' status. The
|
||||||
* admin may even set reviewers/approvers even if is disallowed in the
|
* admin may even set reviewers/approvers if is disallowed in the
|
||||||
* settings.
|
* settings.
|
||||||
*/
|
*/
|
||||||
function maySetReviewersApprovers() { /* {{{ */
|
function maySetReviewersApprovers() { /* {{{ */
|
||||||
|
@ -105,6 +105,26 @@ class LetoDMS_AccessOperation {
|
||||||
return false;
|
return false;
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if workflow may be edited
|
||||||
|
*
|
||||||
|
* This check can only be done for documents. Overwriting the document
|
||||||
|
* workflow is only allowed if version modification is turned on
|
||||||
|
* in the settings and the document is in it's initial status. The
|
||||||
|
* admin may even set the workflow if is disallowed in the
|
||||||
|
* settings.
|
||||||
|
*/
|
||||||
|
function maySetWorkflow() { /* {{{ */
|
||||||
|
if(get_class($this->obj) == 'LetoDMS_Core_Document') {
|
||||||
|
$latestContent = $this->obj->getLatestContent();
|
||||||
|
$workflow = $latestContent->getWorkflow();
|
||||||
|
if ((($this->settings->_enableVersionModification && ($this->obj->getAccessMode($this->user) == M_ALL)) || $this->user->isAdmin()) && (!$workflow || ($workflow->getInitState()->getID() == $latestContent->getWorkflowState()->getID()))) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
} /* }}} */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if expiration date may be set
|
* Check if expiration date may be set
|
||||||
*
|
*
|
||||||
|
@ -158,7 +178,8 @@ class LetoDMS_AccessOperation {
|
||||||
if(get_class($this->obj) == 'LetoDMS_Core_Document') {
|
if(get_class($this->obj) == 'LetoDMS_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_READWRITE)) || $this->user->isAdmin()) && ($status["status"]==S_DRAFT_REV)) {
|
$workflow = $latestContent->getWorkflow();
|
||||||
|
if ((($this->settings->_enableVersionModification && ($this->obj->getAccessMode($this->user) >= M_READWRITE)) || $this->user->isAdmin()) && ($status["status"]==S_DRAFT_REV || ($workflow && $workflow->getInitState()->getID() == $latestContent->getWorkflowState()->getID()))) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user