screentinker/server
ScreenTinker d2a3bdfd15 fix(auth/me): broaden non-admin accessible_workspaces to include org_owner/org_admin paths
The non-admin branch of /me's accessible_workspaces query drove
from workspace_members, so users with org_owner or org_admin on
an organization but no direct workspace_members row were missing
those workspaces from their /me response - and therefore from the
switcher dropdown. Mirrors the access logic in
accessibleWorkspaceIds() (lib/tenancy.js) while keeping the
full-row SELECT shape /me needs.

Verified end-to-end with switcher-test@local.test acting as
org_owner of Acme Studios with no workspace_members row on
Studio B - Studio B now appears in /me's accessible_workspaces
with workspace_role: null, can_admin: true.

Also updates the stale TODO comment in tenancy.js that flagged
this exact gap.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-16 11:50:37 -05:00
..
config fix: log real client IPs through Cloudflare instead of CF edge 2026-05-07 15:26:37 -05:00
db Add player debug overlay and server-side error telemetry sink 2026-05-15 15:20:42 -05:00
lib fix(auth/me): broaden non-admin accessible_workspaces to include org_owner/org_admin paths 2026-05-16 11:50:37 -05:00
middleware feat(email): Microsoft Graph send + alert spam protection + preferences UI 2026-05-12 18:16:40 -05:00
player Add player debug overlay and server-side error telemetry sink 2026-05-15 15:20:42 -05:00
routes fix(auth/me): broaden non-admin accessible_workspaces to include org_owner/org_admin paths 2026-05-16 11:50:37 -05:00
services feat(socket): delivery queue for offline-device emits 2026-05-14 13:06:43 -05:00
ws fix(socket): offline debounce + truthful single-device command feedback 2026-05-14 13:11:40 -05:00
.gitignore feat(email): Microsoft Graph send + alert spam protection + preferences UI 2026-05-12 18:16:40 -05:00
config.js feat(socket): delivery queue for offline-device emits 2026-05-14 13:06:43 -05:00
package-lock.json feat(email): Microsoft Graph send + alert spam protection + preferences UI 2026-05-12 18:16:40 -05:00
package.json feat(email): Microsoft Graph send + alert spam protection + preferences UI 2026-05-12 18:16:40 -05:00
server.js Add player debug overlay and server-side error telemetry sink 2026-05-15 15:20:42 -05:00