Update CollectionController, limit unpublished collections to owner

pull/3360/head
Daniel Supernault 4 years ago
parent dab9bcaf36
commit a0061eb56c
No known key found for this signature in database
GPG Key ID: 0DEF1C662C9033F7

@ -237,6 +237,9 @@ class CollectionController extends Controller
return Collection::whereProfileId($profile->id)
->whereIn('visibility', $visibility)
->when(!$owner, function($q, $owner) {
return $q->whereNotNull('published_at');
})
->orderByDesc('id')
->paginate(9)
->map(function($collection) {

Loading…
Cancel
Save