mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-03-12 08:55:54 +00:00
Merge branch 'seeddms-4.2.2' into develop
This commit is contained in:
commit
36942e879e
|
@ -1208,7 +1208,7 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */
|
|||
if (isset($approvers[$i])) {
|
||||
foreach ($approvers[$i] as $approverID) {
|
||||
$approver=($i=="i" ? $this->_dms->getUser($approverID) : $this->_dms->getGroup($approverID));
|
||||
$res=($i=="i" ? $docResultSet->getContent()->addIndApprover($approver, $user, !$pendingReview) : $docResultSet->getContent()->addGrpApprover($approver, $user, !$pendingReview));
|
||||
$res=($i=="i" ? $docResultSet->getContent()->addIndApprover($approver, $user, true) : $docResultSet->getContent()->addGrpApprover($approver, $user, !$pendingReview));
|
||||
$docResultSet->addApprover($approver, $i, $res);
|
||||
if ($res==0 || $res=-3 || $res=-4) {
|
||||
$pendingApproval=true;
|
||||
|
@ -2378,14 +2378,18 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
|
|||
return $this->_approvalStatus;
|
||||
} /* }}} */
|
||||
|
||||
function addIndReviewer($user, $requestUser) { /* {{{ */
|
||||
function addIndReviewer($user, $requestUser, $listadmin=false) { /* {{{ */
|
||||
$db = $this->_document->_dms->getDB();
|
||||
|
||||
$userID = $user->getID();
|
||||
|
||||
// Get the list of users and groups with read access to this document.
|
||||
if($this->_document->getAccessMode($user) < M_READ) {
|
||||
return -2;
|
||||
}
|
||||
/*
|
||||
if (!isset($this->_readAccessList)) {
|
||||
$this->_readAccessList = $this->_document->getReadAccessList();
|
||||
$this->_readAccessList = $this->_document->getReadAccessList($listadmin);
|
||||
}
|
||||
$approved = false;
|
||||
foreach ($this->_readAccessList["users"] as $appUser) {
|
||||
|
@ -2397,6 +2401,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
|
|||
if (!$approved) {
|
||||
return -2;
|
||||
}
|
||||
*/
|
||||
|
||||
// Check to see if the user has already been added to the review list.
|
||||
$reviewStatus = $user->getReviewStatus($this->_document->getID(), $this->_version);
|
||||
|
@ -2603,18 +2608,19 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
|
|||
}
|
||||
} /* }}} */
|
||||
|
||||
function addIndApprover($user, $requestUser) { /* {{{ */
|
||||
function addIndApprover($user, $requestUser, $listadmin=false) { /* {{{ */
|
||||
$db = $this->_document->_dms->getDB();
|
||||
|
||||
$userID = $user->getID();
|
||||
|
||||
// Get the list of users and groups with read access to this document.
|
||||
if (!isset($this->_readAccessList)) {
|
||||
// TODO: error checking.
|
||||
$this->_readAccessList = $this->_document->getReadAccessList();
|
||||
if($this->_document->getAccessMode($user) < M_READ) {
|
||||
return -2;
|
||||
}
|
||||
/*
|
||||
$readAccessList = $this->_document->getReadAccessList($listadmin);
|
||||
$approved = false;
|
||||
foreach ($this->_readAccessList["users"] as $appUser) {
|
||||
foreach ($readAccessList["users"] as $appUser) {
|
||||
if ($userID == $appUser->getID()) {
|
||||
$approved = true;
|
||||
break;
|
||||
|
@ -2623,6 +2629,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
|
|||
if (!$approved) {
|
||||
return -2;
|
||||
}
|
||||
*/
|
||||
|
||||
// Check to see if the user has already been added to the approvers list.
|
||||
$approvalStatus = $user->getApprovalStatus($this->_document->getID(), $this->_version);
|
||||
|
|
Loading…
Reference in New Issue
Block a user