feat(v3-auth): modernize hosted file access with simplified bypass pattern

- Roll out platform-wide standard for unauthenticated binary access using '?key=[account_id]' query parameter.
- Update API helpers (get, post, patch) to recognize 'key' bypass and strip account context headers accordingly.
- Refactor IDAA Bulletin Board to restore inline image rendering and edit-mode previews.
- Modernize Events Launcher (Layout, Sync, Session View) to use V3 Action URLs with verified auth.
- Update HTML generators in 'ae_utils.ts' to support the new authenticated URL structure.
- Harden 'ae_comp__event_file_obj_tbl' CSV export and clipboard links with V3 standard patterns.
This commit is contained in:
Scott Idem
2026-02-03 18:37:55 -05:00
parent 6634c9aef0
commit 0809ad3eac
21 changed files with 412 additions and 701 deletions

View File

@@ -81,6 +81,8 @@ function handle_url_and_message(name: string, value: null | string) {
// console.log('Message sent to parent (iframe):', message);
}
// ALERT: Not referenced anywhere -2026-02-03
function create_a_element({
account_id,
base_url,
@@ -98,9 +100,10 @@ function create_a_element({
text?: string;
class_li?: string;
}) {
return `<a href="${base_url}/hosted_file/${hosted_file_id}/download?x_no_account_id_token=${account_id}&filename=${filename}" class="${class_li}">${text}</a>`;
return `<a href="${base_url}/v3/action/hosted_file/${hosted_file_id}/download?key=${account_id}&filename=${filename}" class="${class_li}">${text}</a>`;
}
// ALERT: Not referenced anywhere -2026-02-03
function create_img_element({
account_id,
base_url,
@@ -122,9 +125,9 @@ function create_img_element({
}) {
let img_html = '';
if (filename) {
img_html = `<img src="${base_url}/hosted_file/${hosted_file_id}/download?x_no_account_id_token=${account_id}&filename=${filename}" class="${class_li}" style="${style}" />`;
img_html = `<img src="${base_url}/v3/action/hosted_file/${hosted_file_id}/download?key=${account_id}&filename=${filename}" class="${class_li}" style="${style}" />`;
} else {
img_html = `<img src="${base_url}/hosted_file/${hosted_file_id}/download?x_no_account_id_token=${account_id}" class="${class_li}" style="${style}" />`;
img_html = `<img src="${base_url}/v3/action/hosted_file/${hosted_file_id}/download?key=${account_id}" class="${class_li}" style="${style}" />`;
}
if (inc_link) {
@@ -141,6 +144,7 @@ function create_img_element({
return img_html;
}
// ALERT: Not referenced anywhere -2026-02-03
function create_video_element({
account_id,
base_url,
@@ -160,9 +164,9 @@ function create_video_element({
}) {
let video_html = '';
if (filename) {
video_html = `<video src="${base_url}/hosted_file/${hosted_file_id}/download?x_no_account_id_token=${account_id}&filename=${filename}" controls class="${class_li}"></video>`;
video_html = `<video src="${base_url}/v3/action/hosted_file/${hosted_file_id}/download?key=${account_id}&filename=${filename}" controls class="${class_li}"></video>`;
} else {
video_html = `<video src="${base_url}/hosted_file/${hosted_file_id}/download?x_no_account_id_token=${account_id}" controls class="${class_li}"></video>`;
video_html = `<video src="${base_url}/v3/action/hosted_file/${hosted_file_id}/download?key=${account_id}" controls class="${class_li}"></video>`;
}
if (inc_link) {