pass enableadminrevapp and enableownerrevapp to getReadAccessList()

This commit is contained in:
Uwe Steinmann 2013-02-27 17:14:23 +01:00
parent 0ec9c5977a
commit 5996ae0731

View File

@ -37,6 +37,9 @@ class SeedDMS_View_SetReviewersApprovers extends SeedDMS_Blue_Style {
$folder = $this->params['folder'];
$document = $this->params['document'];
$content = $this->params['version'];
$enableadminrevapp = $this->params['enableadminrevapp'];
$enableownerrevapp = $this->params['enableownerrevapp'];
$enableselfrevapp = $this->params['enableselfrevapp'];
$overallStatus = $content->getStatus();
@ -46,7 +49,7 @@ class SeedDMS_View_SetReviewersApprovers extends SeedDMS_Blue_Style {
$this->contentHeading(getMLText("change_assignments"));
// Retrieve a list of all users and groups that have review / approve privileges.
$docAccess = $document->getReadAccessList();
$docAccess = $folder->getReadAccessList($enableadminrevapp, $enableownerrevapp);
// Retrieve list of currently assigned reviewers and approvers, along with
// their latest status.
@ -58,8 +61,7 @@ class SeedDMS_View_SetReviewersApprovers extends SeedDMS_Blue_Style {
foreach ($reviewStatus as $i=>$rs) {
if ($rs["type"]==0) {
$reviewIndex["i"][$rs["required"]] = array("status"=>$rs["status"], "idx"=>$i);
}
else if ($rs["type"]==1) {
} elseif ($rs["type"]==1) {
$reviewIndex["g"][$rs["required"]] = array("status"=>$rs["status"], "idx"=>$i);
}
}
@ -69,8 +71,7 @@ class SeedDMS_View_SetReviewersApprovers extends SeedDMS_Blue_Style {
foreach ($approvalStatus as $i=>$rs) {
if ($rs["type"]==0) {
$approvalIndex["i"][$rs["required"]] = array("status"=>$rs["status"], "idx"=>$i);
}
else if ($rs["type"]==1) {
} elseif ($rs["type"]==1) {
$approvalIndex["g"][$rs["required"]] = array("status"=>$rs["status"], "idx"=>$i);
}
}
@ -97,7 +98,7 @@ class SeedDMS_View_SetReviewersApprovers extends SeedDMS_Blue_Style {
print "<li class=\"cbSelectItem\"><input type='checkbox' checked='checked' disabled='disabled'>". htmlspecialchars($usr->getLogin() . " - ". $usr->getFullName())." &lt;".$usr->getEmail()."&gt;";
print "<input id='revInd".$usr->getID()."' type='hidden' name='indReviewers[]' value='". $usr->getID() ."'>";
}else if (isset($reviewIndex["i"][$usr->getID()])) {
} elseif (isset($reviewIndex["i"][$usr->getID()])) {
switch ($reviewIndex["i"][$usr->getID()]["status"]) {
case 0:
@ -110,8 +111,8 @@ class SeedDMS_View_SetReviewersApprovers extends SeedDMS_Blue_Style {
print "<li class=\"cbSelectItem\"><input id='revInd".$usr->getID()."' type='checkbox' name='indReviewers[]' value='". $usr->getID() ."' disabled='disabled'>".htmlspecialchars($usr->getLogin() . " - ". $usr->getFullName());
break;
}
}
else {
} else {
if (!$enableselfrevapp && $usr->getID()==$user->getID()) continue;
print "<li class=\"cbSelectItem\"><input id='revInd".$usr->getID()."' type='checkbox' name='indReviewers[]' value='". $usr->getID() ."'>". htmlspecialchars($usr->getLogin() . " - ". $usr->getFullName());
}
}
@ -132,7 +133,7 @@ class SeedDMS_View_SetReviewersApprovers extends SeedDMS_Blue_Style {
print "<li class=\"cbSelectItem\"><input type='checkbox' checked='checked' disabled='disabled'>".htmlspecialchars($group->getName());
print "<input id='revGrp".$group->getID()."' type='hidden' name='grpReviewers[]' value='". $group->getID() ."'>";
}else if (isset($reviewIndex["g"][$group->getID()])) {
} elseif (isset($reviewIndex["g"][$group->getID()])) {
switch ($reviewIndex["g"][$group->getID()]["status"]) {
case 0:
@ -173,7 +174,7 @@ class SeedDMS_View_SetReviewersApprovers extends SeedDMS_Blue_Style {
print "<li class=\"cbSelectItem\"><input type='checkbox' checked='checked' disabled='disabled'>". htmlspecialchars($usr->getLogin() . " - ". $usr->getFullName())." &lt;".$usr->getEmail()."&gt;";
print "<input id='appInd".$usr->getID()."' type='hidden' name='indApprovers[]' value='". $usr->getID() ."'>";
}else if (isset($approvalIndex["i"][$usr->getID()])) {
} elseif (isset($approvalIndex["i"][$usr->getID()])) {
switch ($approvalIndex["i"][$usr->getID()]["status"]) {
case 0:
@ -186,8 +187,8 @@ class SeedDMS_View_SetReviewersApprovers extends SeedDMS_Blue_Style {
print "<li class=\"cbSelectItem\"><input id='appInd".$usr->getID()."' type='checkbox' name='indApprovers[]' value='". $usr->getID() ."' disabled='disabled'>".htmlspecialchars($usr->getLogin() . " - ". $usr->getFullName());
break;
}
}
else {
} else {
if (!$enableselfrevapp && $usr->getID()==$user->getID()) continue;
print "<li class=\"cbSelectItem\"><input id='appInd".$usr->getID()."' type='checkbox' name='indApprovers[]' value='". $usr->getID() ."'>". htmlspecialchars($usr->getLogin() . " - ". $usr->getFullName());
}
}
@ -208,7 +209,7 @@ class SeedDMS_View_SetReviewersApprovers extends SeedDMS_Blue_Style {
print "<li class=\"cbSelectItem\"><input type='checkbox' checked='checked' disabled='disabled'>".htmlspecialchars($group->getName());
print "<input id='appGrp".$group->getID()."' type='hidden' name='grpApprovers[]' value='". $group->getID() ."'>";
}else if (isset($approvalIndex["g"][$group->getID()])) {
} elseif (isset($approvalIndex["g"][$group->getID()])) {
switch ($approvalIndex["g"][$group->getID()]["status"]) {
case 0: