check access on CheckOutDocument

This commit is contained in:
Uwe Steinmann 2024-10-30 19:45:10 +01:00
parent 588d150c39
commit c2f69ce491
2 changed files with 7 additions and 3 deletions

View File

@ -853,7 +853,9 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
} }
} else { } else {
if($this->params['checkoutdir']) { if($this->params['checkoutdir']) {
$menuitems['checkout_document'] = array('link'=>$this->params['settings']->_httpRoot."op/op.CheckOutDocument".$docid, 'label'=>getMLText('checkout_document')); if ($accessobject->check_controller_access('CheckOutDocument')) {
$menuitems['checkout_document'] = array('link'=>$this->params['settings']->_httpRoot."op/op.CheckOutDocument".$docid, 'label'=>getMLText('checkout_document'));
}
} }
} }
if($accessobject->check_controller_access('EditDocument')) if($accessobject->check_controller_access('EditDocument'))

View File

@ -779,8 +779,10 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
$menuitems['checkin_document'] = array('link'=>$this->params['settings']->_httpRoot."out/out.CheckInDocument".$docid, 'label'=>getMLText('checkin_document')); $menuitems['checkin_document'] = array('link'=>$this->params['settings']->_httpRoot."out/out.CheckInDocument".$docid, 'label'=>getMLText('checkin_document'));
} }
} else { } else {
if($this->params['checkoutdir']) { if ($this->params['checkoutdir']) {
$menuitems['checkout_document'] = array('link'=>$this->params['settings']->_httpRoot."op/op.CheckOutDocument".$docid, 'label'=>getMLText('checkout_document')); if ($accessobject->check_controller_access('CheckOutDocument')) {
$menuitems['checkout_document'] = array('link'=>$this->params['settings']->_httpRoot."op/op.CheckOutDocument".$docid, 'label'=>getMLText('checkout_document'));
}
} }
} }
if($accessobject->check_controller_access('EditDocument')) if($accessobject->check_controller_access('EditDocument'))