trypost/app/Http
Paulo Castellano 5bb39da598 fix(permissions): enforce workspace roles across backend and UI
Viewers could mutate posts, automations and trigger AI write endpoints,
and every role saw create/manage affordances that 403'd on click.

Backend (security):
- PostPolicy update/delete now require member+ (was tenancy-only), which
  also gates the AI write endpoints that authorize('update')
- AutomationPolicy create/update/delete require member+; activate/pause
  delegate to update
- AutomationController authorizes index/store/show; AnalyticsController
  authorizes view
- Comments stay open to members incl. viewer (by design)

Frontend (UI gating via new useWorkspaceRole composable):
- Sidebar: create post / create workspace / automations / library nav
- Accounts grid: connect / disconnect / reconnect (admin+)
- Members: invite / change role / remove / cancel invite (admin+)
- Account billing tab (owner); posts index + calendar create affordances

Tests: PostPolicyTest, AutomationPolicyTest (all four roles) and an
end-to-end WorkspaceRolePermissionsTest; aligned the automation test
suites' account/workspace setup with role pivots.
2026-06-22 16:31:54 -03:00
..
Controllers fix(permissions): enforce workspace roles across backend and UI 2026-06-22 16:31:54 -03:00
Middleware feat: per-workspace pricing, onboarding, and billing overhaul 2026-06-21 20:40:03 -03:00
Requests fix(members): preserve invited role on accept and surface viewer in role menu 2026-06-22 14:24:19 -03:00
Resources feat(automations): multi-format RSS/Atom feeds with dynamic variables 2026-06-16 10:56:08 -03:00