fix: align resource creation permissions

This commit is contained in:
Andras Bacsai
2026-06-29 15:57:17 +02:00
parent 9f36a8df31
commit 29445bf177
10 changed files with 177 additions and 34 deletions
@@ -3,12 +3,17 @@
namespace App\Livewire\Project\New;
use App\Models\Project;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Livewire\Component;
class EmptyProject extends Component
{
use AuthorizesRequests;
public function createEmptyProject()
{
$this->authorize('create', Project::class);
$project = Project::create([
'name' => generate_random_name(),
'team_id' => currentTeam()->id,