mirror of https://github.com/kcal-app/kcal.git
20 lines
338 B
PHP
20 lines
338 B
PHP
<?php
|
|
|
|
namespace App\Policies;
|
|
|
|
use App\Models\User;
|
|
use Illuminate\Auth\Access\HandlesAuthorization;
|
|
|
|
class UserPolicy
|
|
{
|
|
use HandlesAuthorization;
|
|
|
|
/**
|
|
* Determine whether the user can delete the model.
|
|
*/
|
|
public function delete(User $user, User $model): bool
|
|
{
|
|
return $user->id !== $model->id;
|
|
}
|
|
}
|