Added the ability to add project information.

This commit is contained in:
2024-04-14 15:27:51 +05:00
parent b7d0a2453e
commit 2769585de0
35 changed files with 862 additions and 14 deletions

View File

@@ -0,0 +1,29 @@
<?php declare(strict_types=1);
namespace App\Policies;
use App\Models\ProjectContent;
use App\Models\User;
final readonly class ProjectContentPolicy extends Policy
{
public function viewAny(User $user): bool
{
return $user->hasPermission('project-content.view');
}
public function view(User $user, ProjectContent $projectContent): bool
{
return $user->hasPermission('project-content.view');
}
public function create(User $user): bool
{
return $user->hasPermission('project-content.create');
}
public function update(User $user, ProjectContent $projectContent): bool
{
return $user->hasPermission('project-content.update');
}
}