Skip to content

Commit eb28338

Browse files
simonhampclaude
andcommitted
Require developer terms acceptance for all plugin submissions
- Move terms check to apply to all plugin types, not just paid - Block plugin create form until terms are accepted (full gate) - Fix onboarding redirect to show terms even if Stripe is set up - Fix null stripe_price error in CustomerLicenseController - Update onboarding FAQ copy - Update tests to reflect universal terms requirement Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 639b6cf commit eb28338

12 files changed

Lines changed: 997 additions & 725 deletions

File tree

.cursor/rules/laravel-boost.mdc

Lines changed: 120 additions & 172 deletions
Large diffs are not rendered by default.

.github/copilot-instructions.md

Lines changed: 120 additions & 172 deletions
Large diffs are not rendered by default.

.junie/guidelines.md

Lines changed: 120 additions & 172 deletions
Large diffs are not rendered by default.

AGENTS.md

Lines changed: 375 additions & 0 deletions
Large diffs are not rendered by default.

CLAUDE.md

Lines changed: 120 additions & 172 deletions
Large diffs are not rendered by default.

app/Http/Controllers/CustomerLicenseController.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ public function index(): View
3232
$subscriptionName = null;
3333
if ($activeSubscription) {
3434
try {
35-
$subscriptionName = \App\Enums\Subscription::fromStripePriceId($activeSubscription->stripe_price)->name();
35+
$subscriptionName = $activeSubscription->stripe_price
36+
? \App\Enums\Subscription::fromStripePriceId($activeSubscription->stripe_price)->name()
37+
: ucfirst($activeSubscription->type);
3638
} catch (\RuntimeException) {
3739
$subscriptionName = ucfirst($activeSubscription->type);
3840
}

app/Http/Controllers/CustomerPluginController.php

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,26 @@ public function index(): View
3737

3838
public function create(): View
3939
{
40-
return view('customer.plugins.create');
40+
$developerAccount = Auth::user()->developerAccount;
41+
42+
return view('customer.plugins.create', [
43+
'hasAcceptedTerms' => $developerAccount?->hasAcceptedCurrentTerms() ?? false,
44+
'hasCompletedOnboarding' => $developerAccount?->hasCompletedOnboarding() ?? false,
45+
]);
4146
}
4247

4348
public function store(SubmitPluginRequest $request, PluginSyncService $syncService): RedirectResponse
4449
{
4550
$user = Auth::user();
4651

52+
// Require developer onboarding and terms acceptance for all plugin submissions
53+
$developerAccount = $user->developerAccount;
54+
55+
if (! $developerAccount || ! $developerAccount->hasAcceptedCurrentTerms()) {
56+
return to_route('customer.developer.onboarding')
57+
->with('message', 'You must accept the Plugin Developer Terms and Conditions before submitting a plugin.');
58+
}
59+
4760
// Reject paid plugin submissions if the feature is disabled
4861
if ($request->type === 'paid' && ! Feature::active(AllowPaidPlugins::class)) {
4962
return to_route('customer.plugins.create')

app/Http/Controllers/DeveloperOnboardingController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public function show(Request $request): View|RedirectResponse
1717
$user = $request->user();
1818
$developerAccount = $user->developerAccount;
1919

20-
if ($developerAccount && $developerAccount->hasCompletedOnboarding()) {
20+
if ($developerAccount && $developerAccount->hasCompletedOnboarding() && $developerAccount->hasAcceptedCurrentTerms()) {
2121
return to_route('customer.developer.dashboard')
2222
->with('message', 'Your developer account is already set up.');
2323
}

boost.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"agents": [
3+
"claude_code",
4+
"copilot",
5+
"cursor",
6+
"opencode",
7+
"phpstorm"
8+
],
9+
"guidelines": []
10+
}

resources/views/customer/developer/onboarding.blade.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,7 @@
6161
@endif
6262
</h2>
6363
<p class="mt-2 text-gray-600 dark:text-gray-400">
64-
@if ($hasExistingAccount)
65-
You've started the onboarding process. Complete the remaining steps to start receiving payouts.
66-
@else
67-
Connect your Stripe account to receive payments when users purchase your plugins.
68-
@endif
64+
Connect your Stripe account to receive payments when users purchase your plugins.
6965
</p>
7066
</div>
7167

@@ -234,7 +230,7 @@ class="w-full rounded-lg bg-indigo-600 px-6 py-3 text-center text-base font-semi
234230
<div>
235231
<h4 class="font-medium text-gray-900 dark:text-white">What do I need to get started?</h4>
236232
<p class="mt-1 text-sm text-gray-600 dark:text-gray-400">
237-
You'll need a Stripe account (or create one during onboarding), a GitHub repository for your plugin, and a nativephp.json configuration file.
233+
You'll need a Stripe account (or create one during onboarding), a GitHub account and a private repository for your plugin.
238234
</p>
239235
</div>
240236
</div>

0 commit comments

Comments
 (0)