From b9f2bafd7a383657dd59ba5f6f6eacf61cd4455b Mon Sep 17 00:00:00 2001 From: Noah Petherbridge Date: Tue, 23 May 2023 23:37:11 -0700 Subject: [PATCH] Bugfix --- pkg/controller/photo/view.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkg/controller/photo/view.go b/pkg/controller/photo/view.go index a50cf4a..60df70e 100644 --- a/pkg/controller/photo/view.go +++ b/pkg/controller/photo/view.go @@ -55,6 +55,12 @@ func View() http.HandlerFunc { return } + // Is this a circle photo? + if photo.Visibility == models.PhotoInnerCircle && !currentUser.IsInnerCircle() { + templates.NotFoundPage(w, r) + return + } + // Is this user private and we're not friends? var ( areFriends = models.AreFriends(user.ID, currentUser.ID)