40 lines
693 B
PHP
40 lines
693 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Policies;
|
|
|
|
use App\Models\Publication;
|
|
use App\Models\User;
|
|
use Illuminate\Auth\Access\HandlesAuthorization;
|
|
|
|
final class PublicationPolicy
|
|
{
|
|
use HandlesAuthorization;
|
|
|
|
public function viewAny(User $user): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public function view(User $user, Publication $publication): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public function create(User $user): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public function update(User $user, Publication $publication): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public function delete(User $user, Publication $publication): bool
|
|
{
|
|
return true;
|
|
}
|
|
}
|