TeamVis Self-Host-Bundle v0.32.0

This commit is contained in:
TeamVis Release
2026-06-26 10:39:46 +02:00
parent 330db52145
commit 1f6c412ee8
3 changed files with 51 additions and 3 deletions
+2 -2
View File
@@ -1,4 +1,4 @@
# TeamVis — Self-Hosting-Bundle (v0.31.0) # TeamVis — Self-Hosting-Bundle (v0.32.0)
Dieses Bundle enthält alles zum **Betreiben** von TeamVis auf eigener Dieses Bundle enthält alles zum **Betreiben** von TeamVis auf eigener
Infrastruktur — **keinen** App-Quellcode. Die App selbst kommt als fertiges Infrastruktur — **keinen** App-Quellcode. Die App selbst kommt als fertiges
@@ -25,4 +25,4 @@ Vollständige Schritt-für-Schritt-Anleitung (von der nackten VM bis live):
| `supabase/migrations/` | Datenbank-Schema (DDL) | | `supabase/migrations/` | Datenbank-Schema (DDL) |
| `docs/` | Anleitungen | | `docs/` | Anleitungen |
Stand: TeamVis 0.31.0. Stand: TeamVis 0.32.0.
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "teamvis-selfhost", "name": "teamvis-selfhost",
"version": "0.31.0", "version": "0.32.0",
"private": true, "private": true,
"description": "Self-Hosting-Bundle für TeamVis (Installer + Migrationen, ohne App-Quellcode).", "description": "Self-Hosting-Bundle für TeamVis (Installer + Migrationen, ohne App-Quellcode).",
"type": "module", "type": "module",
@@ -0,0 +1,48 @@
-- ====================================================================
-- 0055_smtp_settings — SMTP-Konfiguration über die Admin-UI
-- ====================================================================
-- Bisher kam SMTP ausschließlich aus ENV-Variablen (lib/email.ts →
-- process.env.SMTP_*). Self-Host-Kunden mussten dafür die .env editieren +
-- Container neu starten. Jetzt pro Mandant in site_settings (Admin → Mail)
-- pflegbar — mit ENV-Fallback (bestehende ENV-Setups laufen unverändert).
--
-- Vorrang in lib/email.ts: ist smtp_host in der DB gesetzt → DB-Konfig,
-- sonst ENV. smtp_pass/-user sind Geheimnisse → NICHT für anon lesbar.
alter table public.site_settings
add column if not exists smtp_host text,
add column if not exists smtp_port integer,
add column if not exists smtp_secure boolean,
add column if not exists smtp_user text,
add column if not exists smtp_pass text,
add column if not exists smtp_from_email text,
add column if not exists smtp_from_name text;
-- anon-Spalten-Grant neu setzen (Muster aus 0043): anon Vollzugriff entziehen,
-- dann ALLE Spalten AUSSER der Geheimnis-/SMTP-Block-Liste freigeben.
-- WICHTIG: Block-Liste = die Original-Geheimnisse aus 0043 + alle smtp_*,
-- sonst würden die in 0043 geschützten Keys wieder anon-lesbar.
revoke all on public.site_settings from anon;
do $$
declare
v_cols text;
begin
select string_agg(quote_ident(column_name), ', ')
into v_cols
from information_schema.columns
where table_schema = 'public'
and table_name = 'site_settings'
and column_name not in (
-- Geheimnis-Spalten aus 0043 (weiter geschützt):
'ai_anthropic_key', 'ai_openai_key', 'ai_openrouter_key',
'apple_pass_cert_p12', 'apple_pass_passphrase', 'apple_pass_type_id',
'google_wallet_service_account_json',
'phone_api_token', 'phone_lookup_token', 'phone_webhook_secret',
'license_key',
-- neu: SMTP-Konfiguration (Zugangsdaten + Infrastruktur, kein anon-Bedarf):
'smtp_host', 'smtp_port', 'smtp_secure', 'smtp_user', 'smtp_pass',
'smtp_from_email', 'smtp_from_name'
);
execute 'grant select (' || v_cols || ') on public.site_settings to anon';
end $$;