mirror of
https://github.com/koel/koel
synced 2024-12-23 11:03:05 +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;
|
|
}
|
|
}
|