. */ namespace Poniverse\Ponyfm\Policies; use Poniverse\Ponyfm\Models\User; class UserPolicy { public function getAlbums(User $userToAuthorize, User $user) { return $userToAuthorize->id === $user->id || $userToAuthorize->hasRole('admin'); } public function getImages(User $userToAuthorize, User $user) { return $userToAuthorize->id === $user->id || $userToAuthorize->hasRole('admin'); } public function edit(User $userToAuthorize, User $user) { return $userToAuthorize->id === $user->id; } }