mirror of
https://github.com/koel/koel
synced 2024-12-21 10:03:10 +00:00
16 lines
317 B
PHP
16 lines
317 B
PHP
<?php
|
|
|
|
namespace App\Policies;
|
|
|
|
use App\Models\User;
|
|
use Illuminate\Auth\Access\HandlesAuthorization;
|
|
|
|
class UserPolicy
|
|
{
|
|
use HandlesAuthorization;
|
|
|
|
public function destroy(User $currentUser, User $userToDestroy)
|
|
{
|
|
return $currentUser->is_admin && $currentUser->id !== $userToDestroy->id;
|
|
}
|
|
}
|