From e62fe9b316a357ca2b9aff0752497edcad55877d Mon Sep 17 00:00:00 2001 From: Patrick Niebeling Date: Tue, 21 Jul 2026 14:10:42 +0200 Subject: [PATCH 1/2] Respect explicit privacy restrictions even when HIDE_LIVE_PEOPLE is disabled Previously, disabling the tree's "hide living people" setting caused canShowRecord() to return true immediately, bypassing RESN restriction notices and individual-level privacy overrides for every record. Move that check after the explicit restriction checks so an individual marked private is still hidden, even when living people are otherwise shown to visitors. --- app/GedcomRecord.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/app/GedcomRecord.php b/app/GedcomRecord.php index fa6fce497b..2619462ead 100644 --- a/app/GedcomRecord.php +++ b/app/GedcomRecord.php @@ -949,11 +949,6 @@ private function parseFacts(): array */ private function canShowRecord(int $access_level): bool { - // This setting would better be called "$ENABLE_PRIVACY" - if (!$this->tree->getPreference('HIDE_LIVE_PEOPLE')) { - return true; - } - // We should always be able to see our own record (unless an admin is applying download restrictions) if ($this->xref() === $this->tree->getUserPreference(Auth::user(), UserInterface::PREF_TREE_ACCOUNT_XREF) && $access_level === Auth::accessLevel($this->tree)) { return true; @@ -987,6 +982,13 @@ private function canShowRecord(int $access_level): bool return true; } + // This setting would better be called "$ENABLE_PRIVACY". + // It only controls the *default* rules for living people (see canShowByType()) - + // explicit restrictions (RESN tags, individual privacy overrides, above) always apply. + if (!$this->tree->getPreference('HIDE_LIVE_PEOPLE')) { + return true; + } + // Different types of record have different privacy rules return $this->canShowByType($access_level); } From 7cbc2584c68a48d69c42d19e96d9ec45a22d0cb1 Mon Sep 17 00:00:00 2001 From: Patrick Niebeling Date: Tue, 21 Jul 2026 14:23:46 +0200 Subject: [PATCH 2/2] chore: retrigger scrutinizer build