Work on permissions for IDAA members in Novi

This commit is contained in:
Scott Idem
2024-11-19 13:48:51 -05:00
parent 31272a8985
commit 9a1d022d5a
5 changed files with 17 additions and 310 deletions

View File

@@ -20,6 +20,18 @@ if (browser) {
// console.log(`$idaa_loc.novi_uuid:`, $idaa_loc.novi_uuid);
// console.log(`$idaa_loc.novi_admin_li:`, $idaa_loc.novi_admin_li);
// Reminder: super > manager > administrator > trusted > public > authenticated > anonymous
if ($ae_loc.iframe && $idaa_loc?.novi_uuid?.length == 36 && $idaa_loc?.novi_email?.length > 3 && $idaa_loc?.novi_full_name?.length > 0) {
$ae_loc.access_type = 'authenticated';
$ae_loc.authenticated_access = true;
$ae_loc.anonymous_access = true;
} else if ($ae_loc.iframe) {
$ae_loc.access_type = 'anonymous';
$ae_loc.authenticated_access = false;
$ae_loc.anonymous_access = true;
}
// NOTE: Check if the novi_uuid is in the novi_admin_li list
if ($idaa_loc.novi_uuid && $idaa_loc.novi_admin_li) {
if ($idaa_loc.novi_admin_li.includes($idaa_loc.novi_uuid)) {
@@ -30,6 +42,7 @@ if (browser) {
$ae_loc.trusted_access = true;
$ae_loc.public_access = true;
$ae_loc.authenticated_access = true;
$ae_loc.anonymous_access = true;
}
}
// NOTE: Check if the novi_uuid is in the novi_trusted_li list
@@ -42,6 +55,7 @@ if (browser) {
$ae_loc.trusted_access = true;
$ae_loc.public_access = true;
$ae_loc.authenticated_access = true;
$ae_loc.anonymous_access = true;
}
}
@@ -114,7 +128,7 @@ $: if ($ae_loc.iframe_height && $ae_loc.iframe_height_modal_body) {
</svelte:head>
{#if ($ae_loc.trusted_access)}
{#if ($ae_loc.authenticated_access)}
<div
bind:clientHeight={$ae_loc.iframe_height}
>