Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
73653b5e2d | ||
|
|
72a1260546 | ||
|
|
76166669ae |
No files matched your search
@@ -1,4 +1,4 @@
|
||||
# TeamVis — Self-Hosting-Bundle (v0.57.0)
|
||||
# TeamVis — Self-Hosting-Bundle (v0.59.1)
|
||||
|
||||
Dieses Bundle enthält alles zum **Betreiben** von TeamVis auf eigener
|
||||
Infrastruktur — **keinen** App-Quellcode. Die App selbst kommt als fertiges
|
||||
@@ -36,4 +36,4 @@ Vollständige Schritt-für-Schritt-Anleitung (von der nackten VM bis live):
|
||||
| `supabase/migrations/` | Datenbank-Schema (DDL) |
|
||||
| `docs/` | Anleitungen |
|
||||
|
||||
Stand: TeamVis 0.57.0.
|
||||
Stand: TeamVis 0.59.1.
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "teamvis-selfhost",
|
||||
"version": "0.57.0",
|
||||
"version": "0.59.1",
|
||||
"private": true,
|
||||
"description": "Self-Hosting-Bundle für TeamVis (Installer + Migrationen, ohne App-Quellcode).",
|
||||
"type": "module",
|
||||
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": "0.57.0",
|
||||
"released": "2026-10-11",
|
||||
"version": "0.59.1",
|
||||
"released": "2026-10-22",
|
||||
"security": false,
|
||||
"summary": "Der Admin-Bereich weist jetzt auf neue TeamVis-Versionen hin. Keine Migration, keine neuen Pflicht-Variablen."
|
||||
"summary": "Schrift durchgehend Funnel Sans, auch in serverseitig erzeugten Bildern. Keine Migration, keine neuen Variablen."
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
-- KI-Anbieter mit OpenAI-kompatibler Schnittstelle und eigener Adresse
|
||||
-- ====================================================================
|
||||
-- Ergänzt die drei festen Anbieter aus 0038 um einen vierten, dessen
|
||||
-- Adresse die Verwaltung selbst einträgt — z. B. ein Hoster mit Sitz und
|
||||
-- Verarbeitung in der EU oder ein selbst betriebenes Modell. Nur additiv:
|
||||
-- neue Spalten und eine erweiterte Prüfregel.
|
||||
|
||||
alter table public.site_settings
|
||||
add column if not exists ai_compatible_name text,
|
||||
add column if not exists ai_compatible_base_url text,
|
||||
add column if not exists ai_compatible_key text,
|
||||
add column if not exists ai_compatible_model text;
|
||||
|
||||
-- Die Prüfregel aus 0038 hat einen automatisch vergebenen Namen; sie wird
|
||||
-- über ihre Definition gefunden und mit 'compatible' neu angelegt.
|
||||
do $$
|
||||
declare c record;
|
||||
begin
|
||||
for c in
|
||||
select conname
|
||||
from pg_constraint
|
||||
where conrelid = 'public.site_settings'::regclass
|
||||
and contype = 'c'
|
||||
and pg_get_constraintdef(oid) like '%ai_active_provider%'
|
||||
loop
|
||||
execute format('alter table public.site_settings drop constraint %I', c.conname);
|
||||
end loop;
|
||||
end $$;
|
||||
|
||||
alter table public.site_settings
|
||||
add constraint site_settings_ai_active_provider_check
|
||||
check (ai_active_provider in ('anthropic', 'openai', 'openrouter', 'compatible'));
|
||||
|
||||
-- Nur verschlüsselte Verbindungen: Über die Schnittstelle gehen
|
||||
-- personenbezogene Daten.
|
||||
alter table public.site_settings drop constraint if exists site_settings_ai_compatible_base_url_https;
|
||||
alter table public.site_settings
|
||||
add constraint site_settings_ai_compatible_base_url_https
|
||||
check (ai_compatible_base_url is null or ai_compatible_base_url ~ '^https://');
|
||||
@@ -0,0 +1,114 @@
|
||||
-- ====================================================================
|
||||
-- 0073_anon_rechte_minimal — anon nur noch dort, wo die Karte liest
|
||||
-- ====================================================================
|
||||
-- Sicherheitsplan M22 (24.10.2026). Supabase vergibt über seine
|
||||
-- Default-Privileges jeder neuen Tabelle volle Rechte an anon (inkl.
|
||||
-- TRUNCATE, das RLS nicht erfasst). RLS hat das bisher abgefangen; jetzt
|
||||
-- werden die Rechte selbst abgebaut. Öffentlich gelesen werden nur
|
||||
-- employees, persons und site_settings — dort gelten weiter die
|
||||
-- Spalten-Grants aus 0014/0045 ff. (ohne Geheimnis-Spalten).
|
||||
--
|
||||
-- Bewusst KEIN "revoke ... on all tables in schema public" und KEIN
|
||||
-- "alter default privileges": Auf gemeinsam genutzten Datenbanken (etwa
|
||||
-- supabase.stwhas.de) liegen fremde Tabellen derselben Eigentümerrolle im
|
||||
-- Schema public; deren Rechte dürfen sich nicht ändern. Deshalb eine
|
||||
-- ausdrückliche Liste der TeamVis-Tabellen. Neue Tabellen nehmen anon die
|
||||
-- Rechte in ihrer eigenen Migration (siehe 0060, 0072 und CLAUDE.md).
|
||||
--
|
||||
-- Ebenfalls entfernt: die Policies admin_write und public_read auf employees (ALL für
|
||||
-- authenticated, true). Sie stammt aus keiner TeamVis-Migration — TeamVis
|
||||
-- nutzt keine Supabase-Auth —, lag aber auf einer Bestandsinstanz und hätte
|
||||
-- jedem Inhaber eines authenticated-JWT Schreibzugriff gegeben.
|
||||
|
||||
do $$
|
||||
declare t text;
|
||||
begin
|
||||
foreach t in array array[
|
||||
'admin_invites',
|
||||
'admin_users',
|
||||
'appointment_requests',
|
||||
'bookings',
|
||||
'calendar_connections',
|
||||
'card_leads',
|
||||
'card_view_log',
|
||||
'change_log',
|
||||
'compliance_role_bindings',
|
||||
'deputies',
|
||||
'external_parties',
|
||||
'job_description_blocks',
|
||||
'job_description_versions',
|
||||
'job_descriptions',
|
||||
'locations',
|
||||
'magic_link_tokens',
|
||||
'org_units',
|
||||
'organigram_versions',
|
||||
'portal_api_tokens',
|
||||
'position_assignments',
|
||||
'positions',
|
||||
'push_preferences',
|
||||
'push_subscriptions',
|
||||
'reception_kiosks',
|
||||
'reception_visit_audit',
|
||||
'service_relations',
|
||||
'teamvis_schema_migrations',
|
||||
'trusted_access_log',
|
||||
'visitor_preregistrations',
|
||||
'wallet_pass_registrations',
|
||||
'webhook_deliveries',
|
||||
'webhook_subscriptions'
|
||||
] loop
|
||||
if to_regclass('public.' || t) is not null then
|
||||
execute format('revoke all on table public.%I from anon', t);
|
||||
end if;
|
||||
end loop;
|
||||
end $$;
|
||||
|
||||
drop policy if exists admin_write on public.employees;
|
||||
|
||||
-- authenticated: dieselben engen Rechte wie anon. TeamVis nutzt keine
|
||||
-- Supabase-Auth; auf gemeinsam genutzten Datenbanken kann es aber Inhaber
|
||||
-- eines authenticated-JWT geben. Übrige Tabellen: keine Rechte; die drei
|
||||
-- Kartentabellen: genau die Lesespalten, die anon hat.
|
||||
do $$
|
||||
declare t text; cols text;
|
||||
begin
|
||||
foreach t in array array[
|
||||
'admin_invites', 'admin_users', 'appointment_requests', 'bookings',
|
||||
'calendar_connections', 'card_leads', 'card_view_log', 'change_log',
|
||||
'compliance_role_bindings', 'deputies', 'external_parties',
|
||||
'job_description_blocks', 'job_description_versions', 'job_descriptions',
|
||||
'locations', 'magic_link_tokens', 'org_units', 'organigram_versions',
|
||||
'portal_api_tokens', 'position_assignments', 'positions',
|
||||
'push_preferences', 'push_subscriptions', 'reception_kiosks',
|
||||
'reception_visit_audit', 'service_relations', 'teamvis_schema_migrations',
|
||||
'trusted_access_log', 'visitor_preregistrations',
|
||||
'wallet_pass_registrations', 'webhook_deliveries', 'webhook_subscriptions'
|
||||
] loop
|
||||
if to_regclass('public.' || t) is not null then
|
||||
execute format('revoke all on table public.%I from authenticated', t);
|
||||
end if;
|
||||
end loop;
|
||||
foreach t in array array['employees', 'persons', 'site_settings'] loop
|
||||
if to_regclass('public.' || t) is null then continue; end if;
|
||||
select string_agg(quote_ident(column_name), ', ' order by column_name) into cols
|
||||
from information_schema.column_privileges
|
||||
where table_schema = 'public' and table_name = t
|
||||
and grantee = 'anon' and privilege_type = 'SELECT';
|
||||
execute format('revoke all on table public.%I from authenticated', t);
|
||||
if cols is not null then
|
||||
execute format('grant select (%s) on public.%I to authenticated', cols, t);
|
||||
end if;
|
||||
end loop;
|
||||
end $$;
|
||||
|
||||
-- Ebenfalls nicht aus TeamVis: Policy public_read (Rolle public, aktive
|
||||
-- Karten). Für anon gilt public_read_active_employees (0001/0014).
|
||||
drop policy if exists public_read on public.employees;
|
||||
|
||||
do $$
|
||||
begin
|
||||
if to_regclass('public.teamvis_schema_migrations') is not null then
|
||||
alter table public.teamvis_schema_migrations enable row level security;
|
||||
revoke all on table public.teamvis_schema_migrations from anon;
|
||||
end if;
|
||||
end $$;
|
||||
Reference in new issue
Block a user