From d6626b2a7e1e4602c8d37d9a445307cb36a3e558 Mon Sep 17 00:00:00 2001 From: Max Date: Tue, 5 May 2026 08:56:13 +0800 Subject: [PATCH] refactor(setup): update preference retrieval to user-scope only - Modified the handleSetupStatus function to read user-specific preferences instead of merged settings, ensuring that personal preferences do not inherit from system or team scopes. - This change enhances the accuracy of user preference handling in the setup status process. --- openapi/setting/setup_status.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/openapi/setting/setup_status.go b/openapi/setting/setup_status.go index f481f74c..4dea3da2 100644 --- a/openapi/setting/setup_status.go +++ b/openapi/setting/setup_status.go @@ -45,7 +45,9 @@ func handleSetupStatus(c *gin.Context) { bannerDismissed := false onboardingCompleted := false if setting.Global != nil { - prefs, _ := setting.Global.GetMerged(info.UserID, info.TeamID, preferenceNS) + // Read user-scope only: these are personal preferences that must not + // inherit from system/team scopes. + prefs, _ := setting.Global.Get(preferenceScope(info), preferenceNS) if prefs != nil { if v, ok := prefs["banner_dismissed"].(bool); ok { bannerDismissed = v