mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-11-26 07:22:11 +00:00
pass context to getAccessMode()
This commit is contained in:
parent
5a3ba8243d
commit
cd0ec52931
|
@ -774,9 +774,11 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
|
|||
$menuitems['expires'] = array('link'=>$this->params['settings']->_httpRoot."out/out.SetExpires".$docid, 'label'=>getMLText('expires'));
|
||||
}
|
||||
}
|
||||
if ($accessMode == M_ALL) {
|
||||
if ($document->getAccessMode($this->params['user'], 'removeDocument') == M_ALL) {
|
||||
if ($accessobject->check_view_access('RemoveDocument'))
|
||||
$menuitems['rm_document'] = array('link'=>$this->params['settings']->_httpRoot."out/out.RemoveDocument".$docid, 'label'=>getMLText('rm_document'));
|
||||
}
|
||||
if($accessMode == M_ALL) {
|
||||
if ($accessobject->check_view_access('DocumentAccess'))
|
||||
$menuitems['edit_document_access'] = array('link'=>$this->params['settings']->_httpRoot."out/out.DocumentAccess". $docid, 'label'=>getMLText('edit_document_access'));
|
||||
}
|
||||
|
@ -3144,7 +3146,7 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
|
|||
if(!empty($extracontent['begin_action_list']))
|
||||
$content .= $extracontent['begin_action_list'];
|
||||
if($accessop->check_view_access('RemoveDocument')) {
|
||||
if($document->getAccessMode($user) >= M_ALL) {
|
||||
if($document->getAccessMode($user, 'removeDocument') >= M_ALL) {
|
||||
$actions['remove_document'] = $this->printDeleteDocumentButton($document, 'splash_rm_document', true);
|
||||
} else {
|
||||
$actions['remove_document'] = '<span style="padding: 2px; color: #CCC;"><i class="fa fa-remove"></i></span>';
|
||||
|
|
|
@ -773,9 +773,11 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
|
|||
$menuitems['expires'] = array('link'=>$this->params['settings']->_httpRoot."out/out.SetExpires".$docid, 'label'=>getMLText('expires'));
|
||||
}
|
||||
}
|
||||
if ($accessMode == M_ALL) {
|
||||
if ($document->getAccessMode($this->params['user'], 'removeDocument') == M_ALL) {
|
||||
if ($accessobject->check_view_access('RemoveDocument'))
|
||||
$menuitems['rm_document'] = array('link'=>$this->params['settings']->_httpRoot."out/out.RemoveDocument".$docid, 'label'=>getMLText('rm_document'));
|
||||
}
|
||||
if($accessMode == M_ALL) {
|
||||
if ($accessobject->check_view_access('DocumentAccess'))
|
||||
$menuitems['edit_document_access'] = array('link'=>$this->params['settings']->_httpRoot."out/out.DocumentAccess". $docid, 'label'=>getMLText('edit_document_access'));
|
||||
}
|
||||
|
@ -3194,7 +3196,7 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
|
|||
if(!empty($extracontent['begin_action_list']))
|
||||
$content .= $extracontent['begin_action_list'];
|
||||
if($accessop->check_view_access('RemoveDocument')) {
|
||||
if($document->getAccessMode($user) >= M_ALL) {
|
||||
if($document->getAccessMode($user, 'removeDocument') >= M_ALL) {
|
||||
$actions['remove_document'] = $this->printDeleteDocumentButton($document, 'splash_rm_document', true);
|
||||
} else {
|
||||
$actions['remove_document'] = '<span style="padding: 2px; color: #CCC;"><i class="fa fa-remove"></i></span>';
|
||||
|
|
Loading…
Reference in New Issue
Block a user