This commit is contained in:
Noah Petherbridge 2023-05-23 23:37:11 -07:00
parent f7b7eabf01
commit b9f2bafd7a

View File

@ -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)