From 17d9760b6129e46de97aee90f28c1fd5c0fa11a5 Mon Sep 17 00:00:00 2001 From: Noah Petherbridge Date: Tue, 16 May 2023 10:10:37 -0700 Subject: [PATCH] Bugfix: Owner of a private photo can see its comment page --- pkg/controller/photo/view.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/controller/photo/view.go b/pkg/controller/photo/view.go index b72687e..a50cf4a 100644 --- a/pkg/controller/photo/view.go +++ b/pkg/controller/photo/view.go @@ -68,7 +68,7 @@ func View() http.HandlerFunc { // Is this a private photo and are we allowed to see? isGranted := models.IsPrivateUnlocked(user.ID, currentUser.ID) - if photo.Visibility == models.PhotoPrivate && !isGranted && !currentUser.IsAdmin { + if photo.Visibility == models.PhotoPrivate && !isGranted && !isOwnPhoto && !currentUser.IsAdmin { templates.NotFoundPage(w, r) return }