removed comments
This commit is contained in:
@@ -7,17 +7,11 @@ use App\Models\User;
|
||||
|
||||
class GamePolicy
|
||||
{
|
||||
/**
|
||||
* Determine whether the user can view any models.
|
||||
*/
|
||||
public function viewAny(User $user): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**2
|
||||
* Determine whether the user can view the model.
|
||||
*/
|
||||
public function view(User $user, Game $game): bool
|
||||
{
|
||||
if ($user->type === "A") {
|
||||
@@ -38,9 +32,6 @@ class GamePolicy
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine whether the user can create models.
|
||||
*/
|
||||
public function create(User $user): bool
|
||||
{
|
||||
if ($user->type === "A") {
|
||||
@@ -86,9 +77,7 @@ class GamePolicy
|
||||
|
||||
return true;
|
||||
}
|
||||
/**
|
||||
* Determine whether the user can update the model.
|
||||
*/
|
||||
|
||||
public function update(User $user, Game $game): bool
|
||||
{
|
||||
if ($user->type === "A") {
|
||||
@@ -105,26 +94,17 @@ class GamePolicy
|
||||
|
||||
return true;
|
||||
}
|
||||
/**
|
||||
* Determine whether the user can delete the model.
|
||||
*/
|
||||
|
||||
public function delete(User $user, Game $game): bool
|
||||
{
|
||||
// Only admins can delete games
|
||||
return $user->type === "A";
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine whether the user can restore the model.
|
||||
*/
|
||||
public function restore(User $user, Game $game): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine whether the user can permanently delete the model.
|
||||
*/
|
||||
public function forceDelete(User $user, Game $game): bool
|
||||
{
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user