trypost/tests/Feature
Paulo Castellano 4d8353d758
MCP: workspace settings, viewer read access, and token access (#241)
* Add workspace MCP settings and token access controls.

Ship MCP settings UI, OAuth revoke/list helpers, Passport deploy wiring,
and workspace.token:mcp gating so assistants can connect without pulling
in welcome/onboarding from the parent epic.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Type MCP client config shapes instead of string checks.

Encode http/config-root on each advanced client and tighten primary
client ids so snippet generation does not branch on magic strings.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Polish MCP settings follow-ups from review.

Translate Ukrainian MCP copy, deep-link ChatGPT into connector
creation, drop an unused asset and revoke arg, and assert PATs are
rejected on the MCP endpoint.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Harden MCP connected clients, revoke scope, and OAuth consent.

List recoverable sessions with live refresh tokens, revoke only PATs,
throttle registration alone, and block viewers from authorizing MCP.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Simplify MCP OAuth route throttling to a single middleware group.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Allow workspace viewers read-only MCP access with web policy writes.

Mirror the web app: MCP connects on view + OAuth mcp:use, write tools
enforce createPost/update/delete/manageAccounts/manageTeam, and demotion
to Viewer keeps grants. Cover role denials, consent, and disconnect.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Harden MCP tool authz with shared workspace helpers.

Route ApiKey tools through AuthorizesMcpTool, fail closed on null user
or policy argument, and resolve the current workspace before mutating.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Drop redundant string casts on validated request data.

Enum::from and validated() fields are already strings, so the casts
add noise without changing behavior.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Show only the current user's MCP connections in settings.

Match API keys privacy: list and disconnect your own OAuth clients,
not teammates' across the account.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Cover LoadWorkspaceFromToken gaps and harden AuthorizesMcpTool tests.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Drop redundant is_string guard before UpdatePostTool find.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Refactor AppSidebar to always show MCP link and simplify route middleware definition in ai.php. The MCP link is now consistently displayed regardless of the current workspace state, and the route middleware syntax has been streamlined.

* Refresh MCP connected clients with Inertia usePoll.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Bump laravel/mcp to 0.9.1 and add the TryPost server icon.

Requires laravel/boost 2.5 for the Icon attribute; expose images/trypost/icon.png on TryPostServer.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Drop no-op ReflectionClass import in TryPostServerTest.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-06 09:54:51 -03:00
..
Actions MCP: workspace settings, viewer read access, and token access (#241) 2026-08-06 09:54:51 -03:00
Ai Add Ukrainian as a supported platform language (#219) 2026-08-05 19:45:30 -03:00
Api MCP: workspace settings, viewer read access, and token access (#241) 2026-08-06 09:54:51 -03:00
App/Post refactor(posts): return the card display domain from the backend 2026-07-17 16:24:23 -03:00
Auth Allow account owners to delete workspaces (#208) 2026-08-01 13:00:38 -04:00
Automation Enforce carousel min slides in Generate and expose min_media_count on API/MCP. 2026-07-24 23:51:10 -03:00
Billing Allow account owners to delete workspaces (#208) 2026-08-01 13:00:38 -04:00
Brand Structure brand voice and make generated copy platform-aware 2026-06-12 17:09:39 -03:00
Commands Give Instagram/Threads a wider proactive-refresh window 2026-07-03 10:33:26 -03:00
Database test(auth): cover remaining surfaces of the registration gate 2026-05-19 12:03:41 -03:00
Discord fix(channels): restrict Discord picker to postable channels the bot can use 2026-06-16 16:34:02 -03:00
Image Harden automations module: full-post generation, reliable runs, editor UX 2026-06-10 20:45:01 -03:00
Jobs Capture post.created to PostHog with created_via. 2026-07-24 11:44:47 -03:00
Listeners Capture post.created to PostHog with created_via. 2026-07-24 11:44:47 -03:00
Mcp MCP: workspace settings, viewer read access, and token access (#241) 2026-08-06 09:54:51 -03:00
Middleware Add Ukrainian as a supported platform language (#219) 2026-08-05 19:45:30 -03:00
Migrations refactor(linkedin): infer post format from media + unify account connection 2026-06-24 21:05:09 -03:00
Models refactor(billing): replace MonthlyCreditsLimit Pennant feature with BillingCycle 2026-06-22 09:55:03 -03:00
Observers Dispatch PostCreated from PostObserver on every create. 2026-07-24 12:01:01 -03:00
Onboarding feat(onboarding): add "where you found us" referral-source step 2026-07-18 16:07:11 -03:00
Permissions Allow account owners to delete workspaces (#208) 2026-08-01 13:00:38 -04:00
Services fix(tiktok): send an empty JSON object to creator_info (#224) 2026-08-05 18:39:32 -03:00
Settings Add Ukrainian as a supported platform language (#219) 2026-08-05 19:45:30 -03:00
Social fix(security): make SSRF private-network block configurable and guard the last user-URL fetches 2026-07-17 15:40:15 -03:00
SocialAccount fix: merge-readiness — close two billing/network bugs, harden tests 2026-06-22 09:26:31 -03:00
Workspace feat: @mentions in comments, AI Action layer + MCP tools, settings tabs 2026-05-01 20:59:03 -03:00
AcceptInviteControllerTest.php Allow account owners to delete workspaces (#208) 2026-08-01 13:00:38 -04:00
AccountControllerTest.php refactor: reorganize settings UI, migrate post templates to a file-based registry, and remove legacy video generation features 2026-05-03 13:44:13 -03:00
AiUsageLogTest.php feat: per-workspace pricing, onboarding, and billing overhaul 2026-06-21 20:40:03 -03:00
ApiKeyControllerTest.php MCP: workspace settings, viewer read access, and token access (#241) 2026-08-06 09:54:51 -03:00
AssetControllerTest.php fix(security): make SSRF private-network block configurable and guard the last user-URL fetches 2026-07-17 15:40:15 -03:00
BillingControllerTest.php refactor: address code review for per-workspace pricing 2026-06-21 21:28:47 -03:00
ChunkedAssetReceiverTest.php test: cover ChunkedAssetReceiver and ChunkReceipt paths 2026-07-23 11:51:13 -03:00
ChunkedCloudUploadTest.php refactor: harden chunked cloud uploads after full PR review 2026-07-23 11:16:39 -03:00
ChunkedUploadFilenameEncodingTest.php fix: stream chunked video finalize to object storage 2026-07-23 10:55:57 -03:00
ContentTypeMediaRulesShareTest.php Restore media-rule parity and release failed MCP upload tokens. 2026-07-24 22:37:57 -03:00
ExampleTest.php refactor: settings redesign, Spanish translations, language system, strict_types 2026-03-30 00:20:43 -03:00
GitHubAuthToggleTest.php feat(auth): self-hosted registration gate + admin seeder (closes #46) 2026-05-19 11:45:16 -03:00
GoogleAuthToggleTest.php feat(auth): self-hosted registration gate + admin seeder (closes #46) 2026-05-19 11:45:16 -03:00
InstagramFacebookIntegrationTest.php feat: add PostCommentCreated broadcast event 2026-04-15 20:11:36 -03:00
InvitePermissionTest.php refactor: address code review for per-workspace pricing 2026-06-21 21:28:47 -03:00
LocalizationParityTest.php Allow account owners to delete workspaces (#208) 2026-08-01 13:00:38 -04:00
McpSettingsControllerTest.php MCP: workspace settings, viewer read access, and token access (#241) 2026-08-06 09:54:51 -03:00
NotificationControllerTest.php refactor: remove onboarding flow, implement brand analysis services, and replace setup middleware with account readiness checks 2026-04-16 23:05:51 -03:00
PlanSeederTest.php feat: per-workspace pricing, onboarding, and billing overhaul 2026-06-21 20:40:03 -03:00
PlanTest.php chore: remove legacy plan tiers (starter/plus/pro/max) 2026-06-22 15:31:32 -03:00
PostCommentControllerTest.php feat: @mentions in comments, AI Action layer + MCP tools, settings tabs 2026-05-01 20:59:03 -03:00
PostControllerTest.php fix: keep post drafts unscheduled by default (#209) 2026-08-01 17:39:18 -03:00
PostMediaAltTextValidationTest.php Harden per-image alt text across publishers, validation, and attach paths 2026-07-16 13:55:33 -03:00
PostSearchTest.php refactor: remove onboarding flow, implement brand analysis services, and replace setup middleware with account readiness checks 2026-04-16 23:05:51 -03:00
PostTemplateControllerTest.php fix: keep post drafts unscheduled by default (#209) 2026-08-01 17:39:18 -03:00
SignupSuccessControllerTest.php refactor: code review fixes — policies, enums, data_get, tests 2026-03-31 00:40:18 -03:00
SocialAccountModelTest.php Keep Instagram/Threads tokens extended while still valid 2026-07-03 09:18:45 -03:00
SocialAccountToggleTest.php refactor: remove onboarding flow, implement brand analysis services, and replace setup middleware with account readiness checks 2026-04-16 23:05:51 -03:00
SocialControllerTest.php fix(linkedin): show connected company page on the accounts and onboarding grids 2026-06-24 21:23:27 -03:00
SocialLoginControllerTest.php refactor: address third-pass review nits 2026-06-22 08:39:25 -03:00
TikTokI18nStringsTest.php fix(tiktok): align UX strings and render processing notice for app review 2026-05-29 10:16:04 -03:00
UpdatePostRequestTest.php Add optional Pinterest pin title and destination link (#232) 2026-08-05 18:15:50 -03:00
UsageControllerTest.php refactor: reorganize settings UI, migrate post templates to a file-based registry, and remove legacy video generation features 2026-05-03 13:44:13 -03:00
VerifyWorkspaceConnectionsTest.php fix(social): move Mastodon default instance to config + cleanup 2026-05-19 08:27:46 -03:00
WorkspaceBillingTest.php feat(onboarding): require connecting a social network before checkout 2026-06-22 12:31:44 -03:00
WorkspaceControllerTest.php Add Ukrainian as a supported platform language (#219) 2026-08-05 19:45:30 -03:00
WorkspaceInviteControllerTest.php MCP: workspace settings, viewer read access, and token access (#241) 2026-08-06 09:54:51 -03:00
WorkspaceInviteGuardTest.php Allow account owners to delete workspaces (#208) 2026-08-01 13:00:38 -04:00
WorkspaceLabelControllerTest.php refactor: remove onboarding flow, implement brand analysis services, and replace setup middleware with account readiness checks 2026-04-16 23:05:51 -03:00
WorkspaceSignatureControllerTest.php chore: remove deprecated localization files 2026-05-03 15:23:25 -03:00
YouTubeAnalyticsTest.php refactor: remove onboarding flow, implement brand analysis services, and replace setup middleware with account readiness checks 2026-04-16 23:05:51 -03:00