mirror of
https://github.com/koel/koel
synced 2024-12-22 10:33:16 +00:00
19 lines
346 B
PHP
19 lines
346 B
PHP
<?php
|
|
|
|
namespace App\Policies;
|
|
|
|
use App\Models\Playlist;
|
|
use App\Models\User;
|
|
|
|
class PlaylistPolicy
|
|
{
|
|
public function own(User $user, Playlist $playlist): bool
|
|
{
|
|
return $playlist->user->is($user);
|
|
}
|
|
|
|
public function download(User $user, Playlist $playlist): bool
|
|
{
|
|
return $this->own($user, $playlist);
|
|
}
|
|
}
|