mirror of
https://github.com/koel/koel
synced 2024-12-13 14:12:27 +00:00
13 lines
237 B
PHP
13 lines
237 B
PHP
<?php
|
|
|
|
namespace App\Policies;
|
|
|
|
use App\Models\User;
|
|
|
|
class UserPolicy
|
|
{
|
|
public function destroy(User $currentUser, User $userToDestroy)
|
|
{
|
|
return $currentUser->is_admin && $currentUser->id !== $userToDestroy->id;
|
|
}
|
|
}
|