diff --git a/inc/inc.ClassAccessOperation.php b/inc/inc.ClassAccessOperation.php index 0cb5662ae..b17f8d6e4 100644 --- a/inc/inc.ClassAccessOperation.php +++ b/inc/inc.ClassAccessOperation.php @@ -411,6 +411,24 @@ class SeedDMS_AccessOperation { return false; } /* }}} */ + /** + * Check if document content may be checked in + * + * + */ + function mayCheckIn($document) { /* {{{ */ + if($document->isType('document')) { + $checkoutinfo = $document->getCheckOutInfo(); + if(!$checkoutinfo) + return false; + $info = $checkoutinfo[0]; + if($this->user->getID() == $info['userID'] || $document->getAccessMode($this->user) == M_ALL) { + return true; + } + } + return false; + } /* }}} */ + protected function check_view_legacy_access($view, $get=array()) { /* {{{ */ if($this->user->isAdmin()) return true;