Fix/team security review #1

Merged
Twyco merged 7 commits from fix/team-security-review into main 2026-09-24 09:21:54 +00:00
Showing only changes of commit ff74d34efd - Show all commits
+5 -5
View File
@@ -11,9 +11,11 @@ Route::middleware(['auth'])->group(function () {
Route::inertia('dashboard', 'Dashboard')->name('dashboard'); Route::inertia('dashboard', 'Dashboard')->name('dashboard');
Route::controller(TeamController::class)->prefix('teams')->name('teams.')->group(function () { Route::controller(TeamController::class)->prefix('teams')->name('teams.')->group(function () {
Route::prefix('invite')->name('invite.')->group(function () { Route::name('invite.')->group(function () {
Route::get('/accept', [TeamInviteAcceptController::class, 'create'])->name('create'); Route::get('invite/accept', [TeamInviteAcceptController::class, 'create'])->name('create');
Route::post('/accept', [TeamInviteAcceptController::class, 'store'])->name('store'); Route::post('invite/accept', [TeamInviteAcceptController::class, 'store'])->name('store');
Route::post('{team:slug}/invite', [TeamController::class, 'invite'])->name('invite');
Route::post('{team:slug}/invite/revoke', [TeamController::class, 'revokeInvite'])->name('revoke')->can('manage', 'team');
}); });
Route::get('/', 'index')->name('index'); Route::get('/', 'index')->name('index');
@@ -23,8 +25,6 @@ Route::middleware(['auth'])->group(function () {
Route::patch('/{team:slug}', 'update')->name('update')->can('manage', 'team'); Route::patch('/{team:slug}', 'update')->name('update')->can('manage', 'team');
Route::post('/name-to-slug', 'nameToSlug')->name('nameToSlug'); Route::post('/name-to-slug', 'nameToSlug')->name('nameToSlug');
Route::get('/{team:slug}', 'show')->name('show')->can('view', 'team'); Route::get('/{team:slug}', 'show')->name('show')->can('view', 'team');
Route::post('{team:slug}/invite', [TeamController::class, 'invite'])->name('invite');
Route::post('{team:slug}/invite/revoke', [TeamController::class, 'revokeInvite'])->name('invite.revoke')->can('manage', 'team');
}); });
}); });