. */ namespace Poniverse\Ponyfm\Policies; use Poniverse\Ponyfm\Models\Track; use Poniverse\Ponyfm\Models\User; class TrackPolicy { public function edit(User $user, Track $track) { return $user->id === $track->user_id || $user->hasRole('admin'); } public function delete(User $user, Track $track) { return $user->id === $track->user_id || $user->hasRole('admin'); } }