mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-03-12 08:55:54 +00:00
maySetExpires() doesn't check if version modification is enabled
this makes no sense because a expiration date can only be set for a document and not for the version
This commit is contained in:
parent
9a9d570d5f
commit
9400a962a8
|
@ -129,16 +129,13 @@ class SeedDMS_AccessOperation {
|
||||||
* Check if expiration date may be set
|
* Check if expiration date may be set
|
||||||
*
|
*
|
||||||
* This check can only be done for documents. Setting the documents
|
* This check can only be done for documents. Setting the documents
|
||||||
* expiration date is only allowed if version modification is turned on in
|
* expiration date is only allowed if the document has not been obsoleted.
|
||||||
* the settings and the document has not been obsoleted.
|
|
||||||
* The admin may set the expiration date even if is
|
|
||||||
* disallowed in the settings.
|
|
||||||
*/
|
*/
|
||||||
function maySetExpires() { /* {{{ */
|
function maySetExpires() { /* {{{ */
|
||||||
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_OBSOLETE)) {
|
if ((($this->obj->getAccessMode($this->user) == M_ALL) || $this->user->isAdmin()) && ($status["status"]!=S_OBSOLETE)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user