add methods mayUpdateReview() and mayUpdateApproval()

This commit is contained in:
Uwe Steinmann 2017-01-16 12:59:41 +01:00
parent 57498f84a1
commit 5339c53fa0

View File

@ -228,6 +228,21 @@ class SeedDMS_AccessOperation {
return false;
} /* }}} */
/**
* Check if a review maybe edited
*
* A review may only be updated by the user who originaly addedd the
* review and if it is allowed in the settings
*/
function mayUpdateReview($updateUser) { /* {{{ */
if(get_class($this->obj) == 'SeedDMS_Core_Document') {
if($this->settings->_enableUpdateRevApp && ($updateUser == $this->user) && !$this->obj->hasExpired()) {
return true;
}
}
return false;
} /* }}} */
/**
* Check if document content may be approved
*
@ -246,5 +261,20 @@ class SeedDMS_AccessOperation {
}
return false;
} /* }}} */
/**
* Check if a approval maybe edited
*
* An approval may only be updated by the user who originaly addedd the
* approval and if it is allowed in the settings
*/
function mayUpdateApproval($updateUser) { /* {{{ */
if(get_class($this->obj) == 'SeedDMS_Core_Document') {
if($this->settings->_enableUpdateRevApp && ($updateUser == $this->user) && !$this->obj->hasExpired()) {
return true;
}
}
return false;
} /* }}} */
}
?>