Fix team authorization, invite revocation, and slug handling
CI/CD / test_and_check_app (push) Failing after 58s
CI/CD / Publish immutable image (push) Skipped

This commit is contained in:
2026-09-19 05:54:18 +02:00
parent 3db250ca51
commit e9fc8cabb5
18 changed files with 688 additions and 226 deletions
+7 -8
View File
@@ -2,6 +2,7 @@
use App\Http\Controllers\TeamController;
use App\Http\Controllers\TeamInviteAcceptController;
use App\Models\Team;
use Illuminate\Support\Facades\Route;
Route::inertia('/', 'Welcome')->name('home');
@@ -16,18 +17,16 @@ Route::middleware(['auth'])->group(function () {
});
Route::get('/', 'index')->name('index');
Route::get('/create', 'create')->name('create');
Route::post('/', 'store')->name('store');
Route::get('/edit/{team:slug}', 'edit')->name('edit');
Route::patch('/{team:slug}', 'update')->name('update');
Route::get('/create', 'create')->name('create')->can('create', Team::class);
Route::post('/', 'store')->name('store')->can('create', Team::class);
Route::get('/edit/{team:slug}', 'edit')->name('edit')->can('manage', 'team');
Route::patch('/{team:slug}', 'update')->name('update')->can('manage', 'team');
Route::post('/name-to-slug', 'nameToSlug')->name('nameToSlug');
Route::get('/{team:slug}', 'show')->name('show');
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');
Route::post('{team:slug}/invite/revoke', [TeamController::class, 'revokeInvite'])->name('invite.revoke')->can('manage', 'team');
});
});
require __DIR__.'/settings.php';