fix(files): refine legacy file upload warnings and trusted-access block bypass

- element_input_files_tbl: only block upload for non-trusted users; trusted_access
  users see the same warnings but can still proceed
- element_input_files_tbl: improved warning message wording for .ppt and .doc
- element_manage_event_file_li: minor tweaks

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Scott Idem
2026-04-19 13:56:19 -04:00
parent 74e65ea892
commit 898afd9775
2 changed files with 31 additions and 17 deletions

View File

@@ -37,6 +37,7 @@ import {
Laptop,
LoaderCircle,
Monitor,
OctagonAlert,
Pencil,
RefreshCw,
Save,
@@ -715,14 +716,24 @@ async function handle_convert_pdf_to_image(event_file_obj: key_val) {
<span
class="flex w-full flex-col justify-between lg:flex-row">
<span
class:preset-tonal-error={event_file_obj.extension == 'doc' || event_file_obj.extension == 'ppt' || event_file_obj.extension == 'xls'}
class:hidden={display_mode !=
'default'}>
'default'}
title={(event_file_obj.extension == 'doc' || event_file_obj.extension == 'ppt' || event_file_obj.extension == 'xls') ? `WARNING: Microsoft 2003 legacy file type. Please resave this in a modern PowerPoint, Word, or Excel format!\nFile type = ${event_file_obj.extension}\nContent type = ${event_file_obj.content_type}` : `File type = ${event_file_obj.extension}\nContent type = ${event_file_obj.content_type}`}
>
Type:
<strong
>{event_file_obj.extension}
>
<ExtIcon
size="1em"
class="inline-block" />
{event_file_obj.extension}
{#if event_file_obj.extension == 'doc' || event_file_obj.extension == 'ppt' || event_file_obj.extension == 'xls'}
<!-- Legacy warning icon -->
<OctagonAlert
size="1em"
class="inline-block" />
{/if}
</strong>
<!-- {#if event_file_obj.open_in_os == 'win'}
<strong>