. */ namespace Poniverse\Ponyfm\Policies; use Poniverse\Ponyfm\Track; use Poniverse\Ponyfm\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'); } }