Various bug fixes. Improvements to the security. Now with super and manager and others.
This commit is contained in:
@@ -76,18 +76,6 @@ export async function handle_load_ae_obj_li__badge(
|
||||
let limit: number = (params.qry__limit ?? 99); // 99
|
||||
let offset: number = (params.qry__offset ?? 0); // 0
|
||||
|
||||
// if ($ae_loc.administrator_access) {
|
||||
// enabled = 'all';
|
||||
// hidden = 'all';
|
||||
// limit = 500;
|
||||
// } else if ($ae_loc.trusted_access) {
|
||||
// // enabled = 'all';
|
||||
// hidden = 'all';
|
||||
// limit = 50;
|
||||
// }
|
||||
|
||||
// let params = {};
|
||||
|
||||
let params_json: key_val = {};
|
||||
if (fulltext_search_qry_str && fulltext_search_qry_str.length > 2) {
|
||||
params_json['ft_qry'] = {
|
||||
|
||||
@@ -75,18 +75,6 @@ export async function handle_load_ae_obj_li__exhibit(
|
||||
let limit: number = (params.qry__limit ?? 99); // 99
|
||||
let offset: number = (params.qry__offset ?? 0); // 0
|
||||
|
||||
// if ($ae_loc.administrator_access) {
|
||||
// enabled = 'all';
|
||||
// hidden = 'all';
|
||||
// limit = 500;
|
||||
// } else if ($ae_loc.trusted_access) {
|
||||
// // enabled = 'all';
|
||||
// hidden = 'all';
|
||||
// limit = 50;
|
||||
// }
|
||||
|
||||
// let params = {};
|
||||
|
||||
let params_json: key_val = {};
|
||||
// params_json['and_qry'] = {};
|
||||
// params_json['and_qry']['license_max'] = 10;
|
||||
|
||||
@@ -68,9 +68,17 @@ export let ae_app_local_data_struct: key_val = {
|
||||
header_image_path: null,
|
||||
},
|
||||
|
||||
'page_access_code_li': {'administrator': '11500', 'trusted': '19111', 'authenticated': '00000'},
|
||||
'administrator_passcode': '11500',
|
||||
'trusted_passcode': '19111',
|
||||
'page_access_code_li': {
|
||||
'manager': '10240',
|
||||
'administrator': '11500',
|
||||
'trusted': '19111',
|
||||
'public': 'public1980',
|
||||
'authenticated': 'auth1980'
|
||||
},
|
||||
// 'manager_passcode': '10240',
|
||||
// 'administrator_passcode': '11500',
|
||||
// 'trusted_passcode': '19111',
|
||||
// 'authenticated_passcode': 'auth2024',
|
||||
|
||||
'access_type': 'anonymous',
|
||||
'administrator_access': false,
|
||||
|
||||
@@ -4,166 +4,192 @@ type key_val = {
|
||||
|
||||
// NOTE: I know there is a better more efficient way to do this, but I don't have time for that right now.
|
||||
export let process_permission_checks = function process_permission_checks(access_type: string) {
|
||||
// let access_checks = { 'access_type': null, 'super_check': null };
|
||||
let access_checks: key_val = {};
|
||||
// let access_checks = { 'access_type': null, 'super_check': null };
|
||||
let access_checks: key_val = {};
|
||||
|
||||
if (access_type == 'super') {
|
||||
access_checks.access_type = 'super';
|
||||
if (access_type == 'super') {
|
||||
access_checks.access_type = 'super';
|
||||
|
||||
access_checks.super_check = true;
|
||||
access_checks.manager_check = false;
|
||||
access_checks.administrator_check = false;
|
||||
access_checks.support_check = false;
|
||||
access_checks.assistant_check = false;
|
||||
access_checks.trusted_check = false;
|
||||
access_checks.verified_check = false;
|
||||
access_checks.provisional_check = false;
|
||||
access_checks.public_check = false;
|
||||
access_checks.authenticated_check = true;
|
||||
access_checks.anonymous_check = false;
|
||||
access_checks.super_check = true;
|
||||
access_checks.manager_check = false;
|
||||
access_checks.administrator_check = false;
|
||||
access_checks.support_check = false;
|
||||
access_checks.assistant_check = false;
|
||||
access_checks.trusted_check = false;
|
||||
access_checks.verified_check = false;
|
||||
access_checks.provisional_check = false;
|
||||
access_checks.public_check = false;
|
||||
access_checks.authenticated_check = true;
|
||||
access_checks.anonymous_check = false;
|
||||
|
||||
access_checks.super_access = true;
|
||||
access_checks.manager_access = true;
|
||||
access_checks.administrator_access = true;
|
||||
access_checks.support_access = true;
|
||||
access_checks.assistant_access = true;
|
||||
access_checks.trusted_access = true;
|
||||
access_checks.verified_access = true;
|
||||
access_checks.provisional_access = true;
|
||||
access_checks.public_access = true;
|
||||
access_checks.authenticated_access = true;
|
||||
access_checks.anonymous_access = true;
|
||||
} else if (access_type == 'manager') {
|
||||
access_checks.access_type = 'manager';
|
||||
access_checks.super_access = true;
|
||||
access_checks.manager_access = true;
|
||||
access_checks.administrator_access = true;
|
||||
access_checks.support_access = true;
|
||||
access_checks.assistant_access = true;
|
||||
access_checks.trusted_access = true;
|
||||
access_checks.verified_access = true;
|
||||
access_checks.provisional_access = true;
|
||||
access_checks.public_access = true;
|
||||
access_checks.authenticated_access = true;
|
||||
access_checks.anonymous_access = true;
|
||||
} else if (access_type == 'manager') {
|
||||
access_checks.access_type = 'manager';
|
||||
|
||||
access_checks.super_check = false;
|
||||
access_checks.manager_check = true;
|
||||
access_checks.administrator_check = false;
|
||||
access_checks.support_check = false;
|
||||
access_checks.assistant_check = false;
|
||||
access_checks.trusted_check = false;
|
||||
access_checks.verified_check = false;
|
||||
access_checks.provisional_check = false;
|
||||
access_checks.public_check = false;
|
||||
access_checks.authenticated_check = true;
|
||||
access_checks.anonymous_check = false;
|
||||
access_checks.super_check = false;
|
||||
access_checks.manager_check = true;
|
||||
access_checks.administrator_check = false;
|
||||
access_checks.support_check = false;
|
||||
access_checks.assistant_check = false;
|
||||
access_checks.trusted_check = false;
|
||||
access_checks.verified_check = false;
|
||||
access_checks.provisional_check = false;
|
||||
access_checks.public_check = false;
|
||||
access_checks.authenticated_check = true;
|
||||
access_checks.anonymous_check = false;
|
||||
|
||||
access_checks.super_access = false;
|
||||
access_checks.manager_access = true;
|
||||
access_checks.administrator_access = true;
|
||||
access_checks.support_access = true;
|
||||
access_checks.assistant_access = true;
|
||||
access_checks.trusted_access = true;
|
||||
access_checks.verified_access = true;
|
||||
access_checks.provisional_access = true;
|
||||
access_checks.public_access = true;
|
||||
access_checks.authenticated_access = true;
|
||||
access_checks.anonymous_access = true;
|
||||
} else if (access_type == 'administrator') {
|
||||
access_checks.access_type = 'administrator';
|
||||
access_checks.super_access = false;
|
||||
access_checks.manager_access = true;
|
||||
access_checks.administrator_access = true;
|
||||
access_checks.support_access = true;
|
||||
access_checks.assistant_access = true;
|
||||
access_checks.trusted_access = true;
|
||||
access_checks.verified_access = true;
|
||||
access_checks.provisional_access = true;
|
||||
access_checks.public_access = true;
|
||||
access_checks.authenticated_access = true;
|
||||
access_checks.anonymous_access = true;
|
||||
} else if (access_type == 'administrator') {
|
||||
access_checks.access_type = 'administrator';
|
||||
|
||||
access_checks.super_check = false;
|
||||
access_checks.manager_check = false;
|
||||
access_checks.administrator_check = true;
|
||||
access_checks.support_check = false;
|
||||
access_checks.assistant_check = false;
|
||||
access_checks.trusted_check = false;
|
||||
access_checks.verified_check = false;
|
||||
access_checks.provisional_check = false;
|
||||
access_checks.public_check = false;
|
||||
access_checks.authenticated_check = false;
|
||||
access_checks.anonymous_check = false;
|
||||
access_checks.super_check = false;
|
||||
access_checks.manager_check = false;
|
||||
access_checks.administrator_check = true;
|
||||
access_checks.support_check = false;
|
||||
access_checks.assistant_check = false;
|
||||
access_checks.trusted_check = false;
|
||||
access_checks.verified_check = false;
|
||||
access_checks.provisional_check = false;
|
||||
access_checks.public_check = false;
|
||||
access_checks.authenticated_check = false;
|
||||
access_checks.anonymous_check = false;
|
||||
|
||||
access_checks.super_access = false;
|
||||
access_checks.manager_access = false;
|
||||
access_checks.administrator_access = true;
|
||||
access_checks.support_access = true;
|
||||
access_checks.assistant_access = true;
|
||||
access_checks.trusted_access = true;
|
||||
access_checks.verified_access = true;
|
||||
access_checks.provisional_access = true;
|
||||
access_checks.public_access = true;
|
||||
access_checks.authenticated_access = true;
|
||||
access_checks.anonymous_access = true;
|
||||
} else if (access_type == 'trusted') {
|
||||
access_checks.access_type = 'trusted';
|
||||
access_checks.super_access = false;
|
||||
access_checks.manager_access = false;
|
||||
access_checks.administrator_access = true;
|
||||
access_checks.support_access = true;
|
||||
access_checks.assistant_access = true;
|
||||
access_checks.trusted_access = true;
|
||||
access_checks.verified_access = true;
|
||||
access_checks.provisional_access = true;
|
||||
access_checks.public_access = true;
|
||||
access_checks.authenticated_access = true;
|
||||
access_checks.anonymous_access = true;
|
||||
} else if (access_type == 'trusted') {
|
||||
access_checks.access_type = 'trusted';
|
||||
|
||||
access_checks.super_check = false;
|
||||
access_checks.manager_check = false;
|
||||
access_checks.administrator_check = false;
|
||||
access_checks.support_check = false;
|
||||
access_checks.assistant_check = false;
|
||||
access_checks.trusted_check = true;
|
||||
access_checks.verified_check = false;
|
||||
access_checks.provisional_check = false;
|
||||
access_checks.public_check = false;
|
||||
access_checks.authenticated_check = true;
|
||||
access_checks.anonymous_check = false;
|
||||
access_checks.super_check = false;
|
||||
access_checks.manager_check = false;
|
||||
access_checks.administrator_check = false;
|
||||
access_checks.support_check = false;
|
||||
access_checks.assistant_check = false;
|
||||
access_checks.trusted_check = true;
|
||||
access_checks.verified_check = false;
|
||||
access_checks.provisional_check = false;
|
||||
access_checks.public_check = false;
|
||||
access_checks.authenticated_check = true;
|
||||
access_checks.anonymous_check = false;
|
||||
|
||||
access_checks.super_access = false;
|
||||
access_checks.manager_access = false;
|
||||
access_checks.administrator_access = false;
|
||||
access_checks.support_access = false;
|
||||
access_checks.assistant_access = false;
|
||||
access_checks.trusted_access = true;
|
||||
access_checks.verified_access = true;
|
||||
access_checks.provisional_access = true;
|
||||
access_checks.public_access = true;
|
||||
access_checks.authenticated_access = true;
|
||||
access_checks.anonymous_access = true;
|
||||
} else if (access_type == 'authenticated') {
|
||||
access_checks.access_type = 'authenticated';
|
||||
access_checks.super_access = false;
|
||||
access_checks.manager_access = false;
|
||||
access_checks.administrator_access = false;
|
||||
access_checks.support_access = false;
|
||||
access_checks.assistant_access = false;
|
||||
access_checks.trusted_access = true;
|
||||
access_checks.verified_access = true;
|
||||
access_checks.provisional_access = true;
|
||||
access_checks.public_access = true;
|
||||
access_checks.authenticated_access = true;
|
||||
access_checks.anonymous_access = true;
|
||||
} else if (access_type == 'public') {
|
||||
access_checks.access_type = 'public';
|
||||
|
||||
access_checks.super_check = false;
|
||||
access_checks.manager_check = false;
|
||||
access_checks.administrator_check = false;
|
||||
access_checks.support_check = false;
|
||||
access_checks.assistant_check = false;
|
||||
access_checks.trusted_check = false;
|
||||
access_checks.verified_check = false;
|
||||
access_checks.provisional_check = false;
|
||||
access_checks.public_check = false;
|
||||
access_checks.authenticated_check = true;
|
||||
access_checks.anonymous_check = false;
|
||||
access_checks.super_check = false;
|
||||
access_checks.manager_check = false;
|
||||
access_checks.administrator_check = false;
|
||||
access_checks.support_check = false;
|
||||
access_checks.assistant_check = false;
|
||||
access_checks.trusted_check = false;
|
||||
access_checks.verified_check = false;
|
||||
access_checks.provisional_check = false;
|
||||
access_checks.public_check = true;
|
||||
access_checks.authenticated_check = false;
|
||||
access_checks.anonymous_check = false;
|
||||
|
||||
access_checks.super_access = false;
|
||||
access_checks.manager_access = false;
|
||||
access_checks.administrator_access = false;
|
||||
access_checks.support_access = false;
|
||||
access_checks.assistant_access = false;
|
||||
access_checks.trusted_access = false;
|
||||
access_checks.verified_access = false;
|
||||
access_checks.provisional_access = false;
|
||||
access_checks.public_access = false;
|
||||
access_checks.authenticated_access = true;
|
||||
access_checks.anonymous_access = true;
|
||||
} else {
|
||||
access_checks.access_type = 'anonymous';
|
||||
access_checks.super_access = false;
|
||||
access_checks.manager_access = false;
|
||||
access_checks.administrator_access = false;
|
||||
access_checks.support_access = false;
|
||||
access_checks.assistant_access = false;
|
||||
access_checks.trusted_access = false;
|
||||
access_checks.verified_access = false;
|
||||
access_checks.provisional_access = false;
|
||||
access_checks.public_access = true;
|
||||
access_checks.authenticated_access = true;
|
||||
access_checks.anonymous_access = true;
|
||||
} else if (access_type == 'authenticated') {
|
||||
access_checks.access_type = 'authenticated';
|
||||
|
||||
access_checks.super_check = false;
|
||||
access_checks.manager_check = false;
|
||||
access_checks.administrator_check = false;
|
||||
access_checks.support_check = false;
|
||||
access_checks.assistant_check = false;
|
||||
access_checks.trusted_check = false;
|
||||
access_checks.verified_check = false;
|
||||
access_checks.provisional_check = false;
|
||||
access_checks.public_check = false;
|
||||
access_checks.authenticated_check = false;
|
||||
access_checks.anonymous_check = true;
|
||||
access_checks.super_check = false;
|
||||
access_checks.manager_check = false;
|
||||
access_checks.administrator_check = false;
|
||||
access_checks.support_check = false;
|
||||
access_checks.assistant_check = false;
|
||||
access_checks.trusted_check = false;
|
||||
access_checks.verified_check = false;
|
||||
access_checks.provisional_check = false;
|
||||
access_checks.public_check = false;
|
||||
access_checks.authenticated_check = true;
|
||||
access_checks.anonymous_check = false;
|
||||
|
||||
access_checks.super_access = false;
|
||||
access_checks.manager_access = false;
|
||||
access_checks.administrator_access = false;
|
||||
access_checks.support_access = false;
|
||||
access_checks.assistant_access = false;
|
||||
access_checks.trusted_access = false;
|
||||
access_checks.verified_access = false;
|
||||
access_checks.provisional_access = false;
|
||||
access_checks.public_access = false;
|
||||
access_checks.authenticated_access = false;
|
||||
access_checks.anonymous_access = true;
|
||||
}
|
||||
access_checks.super_access = false;
|
||||
access_checks.manager_access = false;
|
||||
access_checks.administrator_access = false;
|
||||
access_checks.support_access = false;
|
||||
access_checks.assistant_access = false;
|
||||
access_checks.trusted_access = false;
|
||||
access_checks.verified_access = false;
|
||||
access_checks.provisional_access = false;
|
||||
access_checks.public_access = false;
|
||||
access_checks.authenticated_access = true;
|
||||
access_checks.anonymous_access = true;
|
||||
} else {
|
||||
access_checks.access_type = 'anonymous';
|
||||
|
||||
return access_checks;
|
||||
access_checks.super_check = false;
|
||||
access_checks.manager_check = false;
|
||||
access_checks.administrator_check = false;
|
||||
access_checks.support_check = false;
|
||||
access_checks.assistant_check = false;
|
||||
access_checks.trusted_check = false;
|
||||
access_checks.verified_check = false;
|
||||
access_checks.provisional_check = false;
|
||||
access_checks.public_check = false;
|
||||
access_checks.authenticated_check = false;
|
||||
access_checks.anonymous_check = true;
|
||||
|
||||
access_checks.super_access = false;
|
||||
access_checks.manager_access = false;
|
||||
access_checks.administrator_access = false;
|
||||
access_checks.support_access = false;
|
||||
access_checks.assistant_access = false;
|
||||
access_checks.trusted_access = false;
|
||||
access_checks.verified_access = false;
|
||||
access_checks.provisional_access = false;
|
||||
access_checks.public_access = false;
|
||||
access_checks.authenticated_access = false;
|
||||
access_checks.anonymous_access = true;
|
||||
}
|
||||
|
||||
return access_checks;
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import { createEventDispatcher, onMount, tick } from 'svelte';
|
||||
|
||||
import { ae_util } from '$lib/ae_utils';
|
||||
import { ae_loc, ae_sess, ae_api, slct, slct_trigger } from '$lib/ae_stores';
|
||||
import { events_loc } from '$lib/ae_events_stores';
|
||||
// import { events_loc } from '$lib/ae_events_stores';
|
||||
// import { db_events } from "$lib/db_events";
|
||||
|
||||
let entered_passcode: null|string = null;
|
||||
@@ -46,7 +46,34 @@ function handle_check_access_type_passcode() {
|
||||
console.log(`*** handle_check_access_type_passcode() *** passcode list:`, $ae_loc.page_access_code_li);
|
||||
|
||||
if (entered_passcode && entered_passcode.length >= 5) {
|
||||
if ($ae_loc.page_access_code_li.administrator == entered_passcode) {
|
||||
|
||||
if ($ae_loc.page_access_code_li.super == entered_passcode) {
|
||||
console.log('Super passcode matched');
|
||||
|
||||
window.localStorage.setItem('access_type', 'super');
|
||||
|
||||
entered_passcode = null;
|
||||
|
||||
$ae_loc.access_type = 'super';
|
||||
trigger = 'process_permission_check';
|
||||
|
||||
dispatch_access_type_changed();
|
||||
|
||||
return true;
|
||||
} else if ($ae_loc.page_access_code_li.manager == entered_passcode) {
|
||||
console.log('Manager passcode matched');
|
||||
|
||||
window.localStorage.setItem('access_type', 'manager');
|
||||
|
||||
entered_passcode = null;
|
||||
|
||||
$ae_loc.access_type = 'manager';
|
||||
trigger = 'process_permission_check';
|
||||
|
||||
dispatch_access_type_changed();
|
||||
|
||||
return true;
|
||||
} else if ($ae_loc.page_access_code_li.administrator == entered_passcode) {
|
||||
console.log('Administrator passcode matched');
|
||||
|
||||
window.localStorage.setItem('access_type', 'administrator');
|
||||
@@ -81,7 +108,7 @@ function handle_check_access_type_passcode() {
|
||||
|
||||
return true;
|
||||
} else if ($ae_loc.page_access_code_li.public == entered_passcode) {
|
||||
console.log('Authenticated passcode matched');
|
||||
console.log('Public passcode matched');
|
||||
|
||||
window.localStorage.setItem('access_type', 'public');
|
||||
|
||||
@@ -197,7 +224,7 @@ function dispatch_edit_mode_changed() {
|
||||
|
||||
|
||||
<div>
|
||||
{#if $ae_loc.access_type && $ae_loc.access_type != 'anonymous' && $ae_loc.access_type != 'authenticated'}
|
||||
{#if $ae_loc.trusted_access}
|
||||
{#if $ae_loc.edit_mode}
|
||||
<button
|
||||
on:click={() => {
|
||||
@@ -229,13 +256,16 @@ function dispatch_edit_mode_changed() {
|
||||
<span class="fas fa-unlock mx-1"></span>
|
||||
|
||||
{#if $ae_loc.access_type == 'super'}
|
||||
<span class="fas fa-secret mx-1"></span> Super
|
||||
<span class="fas fa-secret m-1"></span> Super
|
||||
{:else if $ae_loc.access_type == 'manager'}
|
||||
<span class="fas fa-user-shield mx-1"></span> Manager
|
||||
<span class="fas fa-user-shield m-1"></span> Manager
|
||||
{:else if $ae_loc.access_type == 'administrator'}
|
||||
<span class="fas fa-user-ninja mx-1"></span> Administrator
|
||||
<span class="fas fa-user-ninja m-1"></span> Administrator
|
||||
{:else if $ae_loc.access_type == 'trusted'}
|
||||
<span class="fas fa-user-check m-1"></span> Trusted
|
||||
Trusted Access
|
||||
{:else if $ae_loc.access_type == 'public'}
|
||||
Public Access
|
||||
{:else if $ae_loc.access_type == 'authenticated'}
|
||||
Authenticated Access
|
||||
{:else if $ae_loc.access_type == 'anonymous'}
|
||||
|
||||
@@ -54,9 +54,9 @@ let ds_code_obj =
|
||||
type: ds_type,
|
||||
for_type: null, // for_type
|
||||
for_id: null, // for_id
|
||||
access_read: null, // 'super', 'administrator', 'trusted', 'anonymous'
|
||||
access_write: null, // 'super', 'administrator', 'trusted', 'anonymous'
|
||||
access_delete: null, // 'super', 'administrator', 'trusted', 'anonymous'
|
||||
access_read: null, // 'super', 'manager', 'administrator', 'trusted', 'authenticated', 'anonymous'
|
||||
access_write: null, // 'super', 'manager', 'administrator', 'trusted', 'authenticated', 'anonymous'
|
||||
access_delete: null, // 'super', 'manager', 'administrator', 'trusted', 'authenticated', 'anonymous'
|
||||
html: null,
|
||||
json: null,
|
||||
md: null,
|
||||
@@ -523,7 +523,7 @@ async function handle_update__data_store({
|
||||
/>
|
||||
</label>
|
||||
{/if}
|
||||
{#if $ae_loc.administrator_access}
|
||||
{#if $ae_loc.manager_access}
|
||||
<input
|
||||
type="text"
|
||||
name="ds_account_id"
|
||||
@@ -551,7 +551,7 @@ async function handle_update__data_store({
|
||||
required
|
||||
/>
|
||||
{/if}
|
||||
{#if $ae_loc.administrator_access}
|
||||
{#if $ae_loc.manager_access}
|
||||
<input
|
||||
type="text"
|
||||
name="ds_type"
|
||||
@@ -709,7 +709,7 @@ async function handle_update__data_store({
|
||||
<!-- {#if mode == 'view'} -->
|
||||
|
||||
{#if !ae_ds_tmp.type && !ae_ds_tmp.html && !ae_ds_tmp.json && !ae_ds_tmp.md && !ae_ds_tmp.text}
|
||||
{#if $ae_loc.administrator_access}
|
||||
{#if $ae_loc.manager_access}
|
||||
<span class="variant-soft-warning">No data found! Is the data store correct or new?</span>
|
||||
{:else}
|
||||
<!-- <span class="variant-soft">loading</span> -->
|
||||
@@ -719,7 +719,7 @@ async function handle_update__data_store({
|
||||
{#if ae_ds_tmp.type == 'html' && ae_ds_tmp.html}
|
||||
{@html ae_ds_tmp.html}
|
||||
{:else if ae_ds_tmp.type == 'html'}
|
||||
{#if $ae_loc.administrator_access}
|
||||
{#if $ae_loc.manager_access}
|
||||
<span class="variant-soft-warning">No HTML found! Is the data store type correct?</span>
|
||||
{:else}
|
||||
<!-- <span class="variant-soft">loading</span> -->
|
||||
@@ -729,7 +729,7 @@ async function handle_update__data_store({
|
||||
{#if ae_ds_tmp.type == 'text' && ae_ds_tmp.text}
|
||||
{ae_ds_tmp.text}
|
||||
{:else if ae_ds_tmp.type == 'text'}
|
||||
{#if $ae_loc.administrator_access}
|
||||
{#if $ae_loc.manager_access}
|
||||
<span class="variant-soft-warning">No text found! Is the data store type correct?</span>
|
||||
{:else}
|
||||
<!-- <span class="variant-soft">loading</span> -->
|
||||
@@ -739,7 +739,7 @@ async function handle_update__data_store({
|
||||
<button
|
||||
type="button"
|
||||
class="ae_btn_edit__ds btn hover:variant-glass-warning text-xs absolute top-0 right-0 opacity-30 hover:opacity-100 transition delay-700 hover:delay-200 m-1 p-1"
|
||||
class:opacity-5={!$ae_loc.administrator_access}
|
||||
class:opacity-5={!$ae_loc.manager_access}
|
||||
class:hidden={!show_edit_btn || !$ae_loc.trusted_access}
|
||||
on:dblclick={() => {
|
||||
trigger = 'load__ds__code';
|
||||
|
||||
@@ -27,15 +27,6 @@ export let display_mode: string = 'default'; // 'default', 'compact', 'minimal',
|
||||
|
||||
export let show_convert_btn: null|boolean = null;
|
||||
|
||||
// This more or less overrides the default access control. Some elements may have their own access control.
|
||||
// if ($ae_loc.administrator_access) {
|
||||
// allow_basic = true;
|
||||
// allow_moderator = true;
|
||||
// } else if ($ae_loc.trusted_access) {
|
||||
// allow_basic = true;
|
||||
// allow_moderator = true;
|
||||
// }
|
||||
|
||||
let ae_placeholder_li: key_val = {};
|
||||
let ae_promises: key_val = {};
|
||||
let ae_tmp: key_val = {};
|
||||
|
||||
@@ -183,7 +183,7 @@ onMount(() => {
|
||||
if (!$ae_loc.iframe && $ae_loc.trusted_access) {
|
||||
$ae_loc.hub.show_element__access_type = true;
|
||||
$ae_loc.hub.show_element__cfg = true;
|
||||
} else if ($ae_loc.iframe && $ae_loc.administrator_access) {
|
||||
} else if ($ae_loc.iframe && $ae_loc.manager_access) {
|
||||
$ae_loc.hub.show_element__access_type = true;
|
||||
$ae_loc.hub.show_element__cfg = true;
|
||||
} else {
|
||||
|
||||
@@ -25,8 +25,11 @@ onMount(() => {
|
||||
<section
|
||||
class="ae_root md:container h-full mx-auto flex flex-col items-center p-4 space-y-12"
|
||||
class:ae_root--auth_access={$ae_loc.auth_access}
|
||||
class:ae_root--public_access={$ae_loc.public_access}
|
||||
class:ae_root--trusted_access={$ae_loc.trusted_access}
|
||||
class:ae_root--administrator_access={$ae_loc.administrator_access}
|
||||
class:ae_root--manager_access={$ae_loc.manager_access}
|
||||
class:ae_root--super_access={$ae_loc.super_access}
|
||||
>
|
||||
|
||||
<Element_data_store
|
||||
@@ -87,7 +90,7 @@ onMount(() => {
|
||||
for_id={null}
|
||||
ds_name="Default: AE Hub - Site root page footer HTML"
|
||||
display="block"
|
||||
class_li={!$ae_loc.trusted_access && $ae_sess.ds_loaded.hub__site__root_page_footer === false ? 'hidden' : ''}
|
||||
class_li={!$ae_loc.manager_access && $ae_sess.ds_loaded.hub__site__root_page_footer === false ? 'hidden' : ''}
|
||||
bind:ds_loaded={$ae_sess.ds_loaded.hub__site__root_page_footer}
|
||||
/>
|
||||
<!-- page footer DS: {$ae_sess.ds_loaded.hub__site__root_page_footer} -->
|
||||
|
||||
@@ -68,7 +68,7 @@ onMount(() => {
|
||||
</svelte:head>
|
||||
|
||||
|
||||
{#if $ae_loc.administrator_access && 1==3}
|
||||
{#if $ae_loc.manager_access && 1==3}
|
||||
<section
|
||||
class="submenu flex flex-row justify-center"
|
||||
class:hidden={$ae_loc.iframe}
|
||||
|
||||
@@ -155,7 +155,7 @@ let lq_kv__event_session_obj_li = liveQuery(
|
||||
{/if}
|
||||
</a>
|
||||
|
||||
{#if $ae_loc.administrator_access}
|
||||
{#if $ae_loc.manager_access}
|
||||
<Comp_event_presenter_obj_li
|
||||
link_to_type={'event_session'}
|
||||
link_to_id={session_obj?.event_session_id_random}
|
||||
@@ -165,7 +165,7 @@ let lq_kv__event_session_obj_li = liveQuery(
|
||||
{/if}
|
||||
|
||||
|
||||
{#if $ae_loc.administrator_access}
|
||||
{#if $ae_loc.manager_access}
|
||||
<Element_manage_event_file_li
|
||||
link_to_type={'event_session'}
|
||||
link_to_id={session_obj?.event_session_id_random}
|
||||
|
||||
@@ -80,7 +80,7 @@ let lq_kv__event_session_obj_li = liveQuery(
|
||||
>
|
||||
<td class="px-4 py-2">
|
||||
<a
|
||||
href="/events/pres_mgmt/{event_session_obj?.event_id_random}/session/{event_session_obj?.event_session_id_random}"
|
||||
href="/events_pres_mgmt/session/{event_session_obj?.event_session_id_random}"
|
||||
class="text-blue-500 hover:text-blue-800 hover:underline"
|
||||
>
|
||||
{event_session_obj?.name}
|
||||
|
||||
@@ -182,25 +182,6 @@ function process_search_string(search_str: string) {
|
||||
|
||||
console.log(`"${search_str}"`);
|
||||
|
||||
// let params = {
|
||||
// 'qry__enabled': $events_loc.pres_mgmt.qry_enabled ?? 'enabled',
|
||||
// 'qry__hidden': $events_loc.pres_mgmt.qry_hidden ?? 'not_hidden',
|
||||
// 'qry__limit': $events_loc.pres_mgmt.qry_limit__sessions ?? 35,
|
||||
// }
|
||||
|
||||
// if ($ae_loc.administrator_access) {
|
||||
// params['qry__enabled'] = 'all';
|
||||
// params['qry__hidden'] = 'all';
|
||||
// params['qry__limit'] = 150;
|
||||
// } else if ($ae_loc.trusted_access) {
|
||||
// params['qry__enabled'] = 'enabled';
|
||||
// params['qry__hidden'] = 'not_hidden';
|
||||
// params['qry__limit'] = 75;
|
||||
// } else {
|
||||
// params['qry__enabled'] = 'enabled';
|
||||
// params['qry__hidden'] = 'not_hidden';
|
||||
// params['qry__limit'] = 35;
|
||||
// }
|
||||
|
||||
handle_search__event_session({
|
||||
ft_search_str: ft_search_str_new,
|
||||
|
||||
@@ -302,7 +302,7 @@ let ae_triggers: key_val = {};
|
||||
</button>
|
||||
{/if}
|
||||
|
||||
{#if $ae_loc.administrator_access}
|
||||
{#if $ae_loc.manager_access}
|
||||
{#if $events_loc.pres_mgmt.qry_enabled == 'all'}
|
||||
<button
|
||||
type="button"
|
||||
|
||||
@@ -259,7 +259,7 @@ let ae_triggers: key_val = {};
|
||||
</button>
|
||||
{/if}
|
||||
|
||||
{#if $ae_loc.administrator_access}
|
||||
{#if $ae_loc.manager_access}
|
||||
{#if $events_loc.pres_mgmt.qry_enabled == 'all'}
|
||||
<button
|
||||
type="button"
|
||||
|
||||
@@ -328,7 +328,7 @@ let ae_triggers: key_val = {};
|
||||
class="btn btn-sm"
|
||||
class:variant-ghost-success={$lq__event_presenter_obj?.enable}
|
||||
class:variant-ringed-warning={!$lq__event_presenter_obj?.enable}
|
||||
disabled={!$ae_loc.administrator_access}
|
||||
disabled={!$ae_loc.manager_access}
|
||||
>
|
||||
{#if $lq__event_presenter_obj?.enable}
|
||||
<span class="fas fa-toggle-on m-1"></span>
|
||||
@@ -348,7 +348,7 @@ let ae_triggers: key_val = {};
|
||||
<!-- Group -->
|
||||
|
||||
|
||||
{#if $ae_loc.administrator_access}
|
||||
{#if $ae_loc.manager_access}
|
||||
<button
|
||||
on:click={() => {
|
||||
if (!confirm('Are you sure you want to delete this speaker?')) {return false;}
|
||||
@@ -370,7 +370,7 @@ let ae_triggers: key_val = {};
|
||||
<span class="fas fa-minus-circle mx-1"></span>
|
||||
Delete
|
||||
</button>
|
||||
{:else if $ae_loc.trusted_access}
|
||||
{:else if $ae_loc.administrator_access}
|
||||
<button
|
||||
on:click={() => {
|
||||
if (!confirm('Are you sure you want to remove (disable) this speaker?')) {return false;}
|
||||
|
||||
@@ -279,7 +279,7 @@ let ae_triggers: key_val = {};
|
||||
class="btn btn-sm"
|
||||
class:variant-ghost-success={$lq__event_session_obj?.enable}
|
||||
class:variant-ringed-warning={!$lq__event_session_obj?.enable}
|
||||
disabled={!$ae_loc.administrator_access}
|
||||
disabled={!$ae_loc.manager_access}
|
||||
>
|
||||
{#if $lq__event_session_obj?.enable}
|
||||
<span class="fas fa-toggle-on m-1"></span>
|
||||
@@ -299,7 +299,7 @@ let ae_triggers: key_val = {};
|
||||
<!-- Group -->
|
||||
|
||||
|
||||
{#if $ae_loc.access_type && $ae_loc.access_type != 'anonymous' && $ae_loc.access_type != 'authenticated'}
|
||||
{#if $ae_loc.trusted_access}
|
||||
{#if $ae_loc.edit_mode}
|
||||
<button
|
||||
on:click={() => {
|
||||
|
||||
Reference in New Issue
Block a user