mirror of
https://github.com/koel/koel
synced 2024-12-03 17:29:33 +00:00
17 lines
303 B
PHP
17 lines
303 B
PHP
<?php
|
|
|
|
namespace App\Policies;
|
|
|
|
use App\Models\Playlist;
|
|
use App\Models\User;
|
|
use Illuminate\Auth\Access\HandlesAuthorization;
|
|
|
|
class PlaylistPolicy
|
|
{
|
|
use HandlesAuthorization;
|
|
|
|
public function owner(User $user, Playlist $playlist)
|
|
{
|
|
return $user->id === $playlist->user_id;
|
|
}
|
|
}
|