diff --git a/app.py b/app.py index 063ec95..b0511c7 100644 --- a/app.py +++ b/app.py @@ -2561,7 +2561,7 @@ def fetch_available_workspaces_for_organization(organization_id: str): with conn.cursor() as cur: cur.execute( """ - SELECT id, key, name, description + SELECT id, key, name, description, organization_id FROM workspaces WHERE organization_id IS NULL OR organization_id = %s ORDER BY (organization_id IS NULL) DESC, name @@ -2569,8 +2569,18 @@ def fetch_available_workspaces_for_organization(organization_id: str): (organization_id,), ) return [ - {"id": str(wid), "key": key, "name": name, "description": description} - for wid, key, name, description in cur.fetchall() + { + "id": str(wid), + "key": key, + "name": name, + "description": description, + # GUI-Umbau Phase 3 (11.09.2026, Kunden-Workspace-Creator): + # ist_global steuert, ob der Kunde die Zusammensetzung + # bearbeiten darf (eigener Workspace) oder nur lesend + # sieht (globaler, schreibgeschützter Standard). + "ist_global": ws_org_id is None, + } + for wid, key, name, description, ws_org_id in cur.fetchall() ] def create_workspace(key: str, name: str, description: str | None, organization_id: str | None):