mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-07 08:34:42 +01:00
Disable app specific actions if the user has no access to the actual app
This commit is contained in:
parent
0232092187
commit
819bc83182
@ -278,6 +278,18 @@ class mail_compose
|
||||
unset($actions['save2vfs']);
|
||||
unset($actions['selectFromVFSForCompose']);
|
||||
}
|
||||
if (!isset($GLOBALS['egw_info']['user']['apps']['infolog']))
|
||||
{
|
||||
unset($actions['to_infolog']);
|
||||
}
|
||||
if (!isset($GLOBALS['egw_info']['user']['apps']['tracker']))
|
||||
{
|
||||
unset($actions['to_tracker']);
|
||||
}
|
||||
if (!isset($GLOBALS['egw_info']['user']['apps']['calendar']))
|
||||
{
|
||||
unset($actions['to_calendar']);
|
||||
}
|
||||
return $actions;
|
||||
}
|
||||
|
||||
|
@ -615,7 +615,7 @@ class mail_ui
|
||||
}
|
||||
// send configured image proxy to client-side
|
||||
$content['image_proxy'] = self::image_proxy();
|
||||
|
||||
$content['no_vfs'] = !$GLOBALS['egw_info']['user']['apps']['filemanager'];
|
||||
return $etpl->exec('mail.mail_ui.index',$content,$sel_options,$readonlys,$preserv);
|
||||
}
|
||||
|
||||
@ -2570,6 +2570,7 @@ $filter['before']= date("d-M-Y", $cutoffdate2);
|
||||
{
|
||||
$attachmentHTML[$key]['classSaveAllPossiblyDisabled'] = "";
|
||||
}
|
||||
if (!$GLOBALS['egw_info']['user']['apps']['filemanager']) $attachmentHTML[$key]['no_vfs'] = true;
|
||||
}
|
||||
$attachmentHTMLBlock="<table width='100%'>";
|
||||
foreach ((array)$attachmentHTML as $row)
|
||||
|
@ -81,8 +81,8 @@
|
||||
<description class="useEllipsis et2_link" id="${row}[filename]" extra_link_target="$row_cont[windowName]" extra_link_popup="$row_cont[popup]" expose_view="true" mime="$row_cont[type]" no_lang="1" mime_data="$row_cont[mime_data]" href="$row_cont[mime_url]"/>
|
||||
<description align="right" id="${row}[size]" />
|
||||
<buttononly id="${row}[save]" value="save" image="fileexport" onclick="app.mail.saveAttachmentHandler(widget,'downloadOneAsFile', ${row})" label="Save to disk"/>
|
||||
<buttononly id="${row}[saveAsVFS]" value="save" image="filemanager/navbar" onclick="app.mail.saveAttachmentHandler(widget,'saveOneToVfs', ${row})" label="Save to filemanager"/>
|
||||
<buttononly class="$row_cont[classSaveAllPossiblyDisabled]" id="${row}[save_all]" value="save_all" image="mail/save_all" onclick="app.mail.saveAttachmentHandler(widget,'saveAllToVfs', ${row})" label="Save all attachments to filemanager"/>
|
||||
<buttononly id="${row}[saveAsVFS]" disabled="$row_cont[no_vfs]" value="save" image="filemanager/navbar" onclick="app.mail.saveAttachmentHandler(widget,'saveOneToVfs', ${row})" label="Save to filemanager"/>
|
||||
<buttononly class="$row_cont[classSaveAllPossiblyDisabled]" disabled="$row_cont[no_vfs]" id="${row}[save_all]" value="save_all" image="mail/save_all" onclick="app.mail.saveAttachmentHandler(widget,'saveAllToVfs', ${row})" label="Save all attachments to filemanager"/>
|
||||
<buttononly class="$row_cont[classSaveAllPossiblyDisabled]" id="${row}[save_zip]" value="save_zip" image="mail/save_zip" onclick="app.mail.saveAttachmentHandler(widget,'downloadAllToZip', ${row})" label="Save as Zip"/>
|
||||
</row>
|
||||
</rows>
|
||||
|
@ -65,8 +65,8 @@
|
||||
<description class="et2_link useEllipsis" id="${row}[filename]" extra_link_target="$row_cont[windowName]" extra_link_popup="$row_cont[popup]" no_lang="1" expose_view="true" mime="$row_cont[type]" mime_data="$row_cont[mime_data]" href="$row_cont[mime_url]"/>
|
||||
<description align="right" id="${row}[size]"/>
|
||||
<buttononly id="${row}[save]" image="fileexport" onclick="app.mail.saveAttachmentHandler(widget,'downloadOneAsFile', ${row})" label="Save to disk"/>
|
||||
<buttononly id="${row}[saveAsVFS]" image="filemanager/navbar" onclick="app.mail.saveAttachmentHandler(widget,'saveOneToVfs', ${row})" label="Save to filemanager"/>
|
||||
<buttononly class="$row_cont[classSaveAllPossiblyDisabled]" id="${row}[save_all]" image="mail/save_all" onclick="app.mail.saveAttachmentHandler(widget,'saveAllToVfs', ${row})" label="Save all attachments to filemanager"/>
|
||||
<buttononly id="${row}[saveAsVFS]" disabled="$row_cont[no_vfs]" image="filemanager/navbar" onclick="app.mail.saveAttachmentHandler(widget,'saveOneToVfs', ${row})" label="Save to filemanager"/>
|
||||
<buttononly class="$row_cont[classSaveAllPossiblyDisabled]" disabled="$row_cont[no_vfs]" id="${row}[save_all]" image="mail/save_all" onclick="app.mail.saveAttachmentHandler(widget,'saveAllToVfs', ${row})" label="Save all attachments to filemanager"/>
|
||||
<buttononly class="$row_cont[classSaveAllPossiblyDisabled]" id="${row}[save_zip]" image="mail/save_zip" onclick="app.mail.saveAttachmentHandler(widget,'downloadAllToZip', ${row})" label="Save as Zip"/>
|
||||
</row>
|
||||
</rows>
|
||||
|
Loading…
Reference in New Issue
Block a user