Adjust ACL behavior for "none" mode and make query cache optional
Some checks failed
Go / build-and-release (push) Has been cancelled
Some checks failed
Go / build-and-release (push) Has been cancelled
This commit allows skipping authentication, permission checks, and certain filters (e.g., deletions, expirations) when the ACL mode is set to "none" (open relay mode). It also introduces a configuration option to disable query caching to reduce memory usage. These changes improve operational flexibility for open relay setups and resource-constrained environments.
This commit is contained in:
@@ -1,10 +1,15 @@
|
||||
<script>
|
||||
export let isLoggedIn = false;
|
||||
export let currentEffectiveRole = "";
|
||||
export let aclMode = "";
|
||||
|
||||
import { createEventDispatcher } from "svelte";
|
||||
const dispatch = createEventDispatcher();
|
||||
|
||||
// When ACL is "none", allow access without login
|
||||
$: canAccess = aclMode === "none" || isLoggedIn;
|
||||
$: canExportAll = aclMode === "none" || currentEffectiveRole === "admin" || currentEffectiveRole === "owner";
|
||||
|
||||
function exportMyEvents() {
|
||||
dispatch("exportMyEvents");
|
||||
}
|
||||
@@ -18,15 +23,17 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
{#if isLoggedIn}
|
||||
<div class="export-section">
|
||||
<h3>Export My Events</h3>
|
||||
<p>Download your personal events as a JSONL file.</p>
|
||||
<button class="export-btn" on:click={exportMyEvents}>
|
||||
📤 Export My Events
|
||||
</button>
|
||||
</div>
|
||||
{#if currentEffectiveRole === "admin" || currentEffectiveRole === "owner"}
|
||||
{#if canAccess}
|
||||
{#if isLoggedIn}
|
||||
<div class="export-section">
|
||||
<h3>Export My Events</h3>
|
||||
<p>Download your personal events as a JSONL file.</p>
|
||||
<button class="export-btn" on:click={exportMyEvents}>
|
||||
📤 Export My Events
|
||||
</button>
|
||||
</div>
|
||||
{/if}
|
||||
{#if canExportAll}
|
||||
<div class="export-section">
|
||||
<h3>Export All Events</h3>
|
||||
<p>
|
||||
|
||||
Reference in New Issue
Block a user