mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-14 05:31:42 +00:00
add methods mayUpdateReview() and mayUpdateApproval()
This commit is contained in:
parent
57498f84a1
commit
5339c53fa0
|
@ -228,6 +228,21 @@ class SeedDMS_AccessOperation {
|
||||||
return false;
|
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
|
* Check if document content may be approved
|
||||||
*
|
*
|
||||||
|
@ -246,5 +261,20 @@ class SeedDMS_AccessOperation {
|
||||||
}
|
}
|
||||||
return false;
|
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;
|
||||||
|
} /* }}} */
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user