From ceb7d6591348d7573227717fd4a36942d2625a69 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 5 Feb 2018 10:31:07 +0100 Subject: [PATCH] add additional view access checks DocumentAccess, UsrView, GroupView, ReviewSummary, ApprovalSummary, WorkflowSummary, ReceiptSummary --- views/bootstrap/class.Bootstrap.php | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index 8dc0db5f7..8f9abfa8b 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -630,7 +630,8 @@ background-image: linear-gradient(to bottom, #882222, #111111);; } if ($accessMode == M_ALL) { $menuitems['rm_document'] = array('link'=>"../out/out.RemoveDocument".$docid, 'label'=>'rm_document'); - $menuitems['edit_document_access'] = array('link'=>"../out/out.DocumentAccess". $docid, 'label'=>'edit_document_access'); + if ($this->check_access('DocumentAccess')) + $menuitems['edit_document_access'] = array('link'=>"../out/out.DocumentAccess". $docid, 'label'=>'edit_document_access'); } if ($accessMode >= M_READ && !$this->params['user']->isGuest()) { $menuitems['edit_existing_notify'] = array('link'=>"../out/out.DocumentNotify". $docid, 'label'=>'edit_existing_notify'); @@ -679,8 +680,10 @@ background-image: linear-gradient(to bottom, #882222, #111111);; echo "
  • ".getMLText("2_factor_auth")."
  • \n"; if ($this->params['enableusersview']){ - echo "
  • ".getMLText("users")."
  • \n"; - echo "
  • ".getMLText("groups")."
  • \n"; + if ($this->check_access('UsrView')) + echo "
  • ".getMLText("users")."
  • \n"; + if ($this->check_access('GroupView')) + echo "
  • ".getMLText("groups")."
  • \n"; } echo "\n"; echo "\n"; @@ -697,12 +700,16 @@ background-image: linear-gradient(to bottom, #882222, #111111);; // echo "
  • ".getMLText("all_documents")."
  • \n"; if($this->params['workflowmode'] == 'traditional' || $this->params['workflowmode'] == 'traditional_only_approval') { if($this->params['workflowmode'] == 'traditional') - echo "
  • ".getMLText("review_summary")."
  • \n"; - echo "
  • ".getMLText("approval_summary")."
  • \n"; + if ($this->check_access('ReviewSummary')) + echo "
  • ".getMLText("review_summary")."
  • \n"; + if ($this->check_access('ApprovalSummary')) + echo "
  • ".getMLText("approval_summary")."
  • \n"; } else { - echo "
  • ".getMLText("workflow_summary")."
  • \n"; + if ($this->check_access('WorkflowSummary')) + echo "
  • ".getMLText("workflow_summary")."
  • \n"; } - echo "
  • ".getMLText("receipt_summary")."
  • \n"; + if ($this->check_access('ReceiptSummary')) + echo "
  • ".getMLText("receipt_summary")."
  • \n"; echo "\n"; echo "\n"; return;