Bugfix: Owner of a private photo can see its comment page
This commit is contained in:
parent
ba9e90b32a
commit
17d9760b61
|
@ -68,7 +68,7 @@ func View() http.HandlerFunc {
|
||||||
|
|
||||||
// Is this a private photo and are we allowed to see?
|
// Is this a private photo and are we allowed to see?
|
||||||
isGranted := models.IsPrivateUnlocked(user.ID, currentUser.ID)
|
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)
|
templates.NotFoundPage(w, r)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user