trypost/tests/Feature/Social
Paulo Castellano dba6346226 refactor(auth): split workspace gate into EnsureHasWorkspace middleware
EnsureAccountReady bundled a subscription gate (redirects to onboarding,
SaaS only) with a workspace gate (redirects to workspace creation). The
connect routes can't sit behind it because connecting/disconnecting
happens during onboarding, before a subscription exists.

Split the workspace gate into a standalone EnsureHasWorkspace middleware:

- EnsureAccountReady is now subscription-only.
- EnsureHasWorkspace redirects to workspace creation when there is no
  current workspace, in both SaaS and self-hosted modes.
- The social connect group gains EnsureHasWorkspace; the main app group
  gains it alongside EnsureAccountReady (listed after it, so the
  subscription gate still runs first — no custom middleware priority).
- The repeated `if (! $workspace) redirect()` guard is removed from the
  connect/store/authorize/disconnect/index/toggle handlers, and their
  return types are tightened (no more dangling RedirectResponse).

LinkedIn connect's no-workspace path changes from a popup callback to the
same redirect as the other platforms.
2026-06-25 14:30:15 -03:00
..
BlueskyControllerTest.php refactor(social): use native Inertia for all connect popup flows 2026-06-25 13:54:16 -03:00
DiscordControllerTest.php refactor(social): use native Inertia for all connect popup flows 2026-06-25 13:54:16 -03:00
FacebookControllerTest.php refactor(social): use native Inertia for all connect popup flows 2026-06-25 13:54:16 -03:00
InstagramControllerTest.php refactor(social): use native Inertia for all connect popup flows 2026-06-25 13:54:16 -03:00
InstagramFacebookControllerTest.php refactor(social): use native Inertia for all connect popup flows 2026-06-25 13:54:16 -03:00
LinkedInControllerTest.php refactor(auth): split workspace gate into EnsureHasWorkspace middleware 2026-06-25 14:30:15 -03:00
MastodonControllerTest.php refactor(social): use native Inertia for all connect popup flows 2026-06-25 13:54:16 -03:00
PinterestControllerTest.php refactor(social): use native Inertia for all connect popup flows 2026-06-25 13:54:16 -03:00
TelegramConnectionTest.php feat(telegram): surface connect failure in the dialog instead of silent expiry 2026-06-22 09:55:12 -03:00
ThreadsControllerTest.php refactor(social): use native Inertia for all connect popup flows 2026-06-25 13:54:16 -03:00
TikTokControllerTest.php refactor(social): use native Inertia for all connect popup flows 2026-06-25 13:54:16 -03:00
XControllerTest.php refactor(social): use native Inertia for all connect popup flows 2026-06-25 13:54:16 -03:00
YouTubeControllerTest.php refactor(social): use native Inertia for all connect popup flows 2026-06-25 13:54:16 -03:00