mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-03-12 08:55:54 +00:00
mayEditComment() checks if document is locked
This commit is contained in:
parent
51b84868a6
commit
e669b0acd5
|
@ -153,6 +153,12 @@ class SeedDMS_AccessOperation {
|
|||
*/
|
||||
function mayEditComment() { /* {{{ */
|
||||
if(get_class($this->obj) == 'SeedDMS_Core_Document') {
|
||||
if($this->obj->isLocked()) {
|
||||
$lockingUser = $this->obj->getLockingUser();
|
||||
if (($lockingUser->getID() != $this->user->getID()) && ($this->obj->getAccessMode($this->user) != M_ALL)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
$latestContent = $this->obj->getLatestContent();
|
||||
$status = $latestContent->getStatus();
|
||||
if ((($this->settings->_enableVersionModification && ($this->obj->getAccessMode($this->user) >= M_READWRITE)) || $this->user->isAdmin()) && ($status["status"]!=S_OBSOLETE)) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user