enhance: patch help_improve bug PR1455#1456
Merged
Wendong-Fan merged 2 commits intopatch-help_improvefrom Mar 5, 2026
Merged
Conversation
8 tasks
effa029 to
be2e3c6
Compare
8 tasks
a7m-1st
reviewed
Mar 5, 2026
Collaborator
a7m-1st
left a comment
There was a problem hiding this comment.
Thanks @Wendong-Fan , LGTM.
Essentially this offloads hardcoding permissions in clientside.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Builds on #1455 by adding a backend-side fix to fully resolve #1454. The frontend-only fix in #1455 addresses new
versions but cannot fix already-released clients that iterate all response keys with
Object.keys(res). This PRfixes the root cause at the API layer.
Changes
Backend (
server/app/model/user/privacy.py)REQUIRED_FIELDSas the single source of truth for which privacy fields are requiredall_required_granted()method to compute whether all required permissions are grantedto_response()to return only model-defined fields plus the computedall_required_grantedflaghelp_improvestored in the DB JSON column are now filtered out at the API layerBackend (
server/app/controller/user/user_controller.py)/api/user/privacynow returnUserPrivacySettings.to_response()instead of rawmodel.pricacy_setting