Files
go-no-go/app/Policies/QuestionGroupPolicy.php
2026-02-16 13:37:37 +01:00

68 lines
1.4 KiB
PHP

<?php
declare(strict_types=1);
namespace App\Policies;
use App\Models\QuestionGroup;
use App\Models\User;
final class QuestionGroupPolicy
{
/**
* Determine whether the user can view any question groups.
*/
public function viewAny(User $user): bool
{
return true;
}
/**
* Determine whether the user can view the question group.
*/
public function view(User $user, QuestionGroup $questionGroup): bool
{
return true;
}
/**
* Determine whether the user can create question groups.
*/
public function create(User $user): bool
{
return true;
}
/**
* Determine whether the user can update the question group.
*/
public function update(User $user, QuestionGroup $questionGroup): bool
{
return true;
}
/**
* Determine whether the user can delete the question group.
*/
public function delete(User $user, QuestionGroup $questionGroup): bool
{
return false;
}
/**
* Determine whether the user can restore the question group.
*/
public function restore(User $user, QuestionGroup $questionGroup): bool
{
return false;
}
/**
* Determine whether the user can permanently delete the question group.
*/
public function forceDelete(User $user, QuestionGroup $questionGroup): bool
{
return false;
}
}