From 0fe538fd8727c49db5c090ef529215a1fdb1448a Mon Sep 17 00:00:00 2001 From: Noah Date: Thu, 8 Sep 2022 09:30:33 -0700 Subject: [PATCH] Fix photo permalink display bug --- 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 01fbdbc..6ddb52a 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 !isGranted && !currentUser.IsAdmin { + if photo.Visibility == models.PhotoPrivate && !isGranted && !currentUser.IsAdmin { templates.NotFoundPage(w, r) return }