feat: add toggleable audit log functionality based on server environment variable
Release / release (pull_request) Successful in 22s

This commit is contained in:
2026-06-26 18:40:25 +01:00
parent 0d98e16f29
commit b4f31aa0ab
3 changed files with 15 additions and 3 deletions
+5
View File
@@ -25,6 +25,7 @@ interface TabItem {
const loggedIn = ref(false);
const checking = ref(true);
const appVersion = ref("unknown");
const auditLogEnabled = ref(true);
const identities = ref<IdentityRow[]>([]);
const allHosts = ref<HostRow[]>([]);
const allFolders = ref<FolderRow[]>([]);
@@ -347,6 +348,9 @@ onMounted(async () => {
if (m.app_version) {
appVersion.value = m.app_version;
}
if (m.audit_log_enabled !== undefined) {
auditLogEnabled.value = m.audit_log_enabled;
}
if (loggedIn.value) await refreshData();
} catch {
loggedIn.value = false;
@@ -918,6 +922,7 @@ async function deleteIdentityRow(id: number) {
API keys
</button>
<button
v-if="auditLogEnabled"
type="button"
class="hidden rounded-lg px-3 py-1.5 text-xs text-slate-400 hover:bg-slate-800 hover:text-white md:inline-flex"
@click="openAuditLog"
+1 -1
View File
@@ -21,7 +21,7 @@ function browseParams(folderId: number | null, q: string): string {
}
export const api = {
async me(): Promise<{ logged_in: boolean; app_version?: string }> {
async me(): Promise<{ logged_in: boolean; app_version?: string; audit_log_enabled?: boolean }> {
const res = await fetch("/api/me", { credentials: "include" });
return handle(res);
},