mirror of
https://github.com/koel/koel
synced 2024-11-13 07:57:10 +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;
|
|
}
|
|
}
|