mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-06-18 02:59:27 +00:00
add new method mayCheckIn()
This commit is contained in:
parent
fe0fd30971
commit
7ae5749bcf
|
@ -411,6 +411,24 @@ class SeedDMS_AccessOperation {
|
||||||
return false;
|
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()) { /* {{{ */
|
protected function check_view_legacy_access($view, $get=array()) { /* {{{ */
|
||||||
if($this->user->isAdmin())
|
if($this->user->isAdmin())
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user