fix: Search filters returned all possible options, not just values for which uset had permissions #632
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.
This pull request adds permission checks to score sets when generating filter options to ensure users can only see filters for which they have permissions to read. To support this change and prevent circular imports, it also refactors the handling of the
UserDatatype throughout the codebase.Score set search filter logic update:
fetch_score_set_search_filter_optionsinsrc/mavedb/lib/score_sets.pyto accept arequesterparameter of typeUserData, and added per-score-set permission checks to ensure only permitted score sets are included in the filter options. ([1], [2])Type definition refactoring:
UserDatadataclass fromsrc/mavedb/lib/authentication.pyto a new module,src/mavedb/lib/types/authentication.py, and removed its previous definition. ([1], [2])UserDatain various files (including authorization, permissions, experiments, routers, and utilities) to referencesrc/mavedb/lib/types/authentication.pyinstead ofsrc/mavedb/lib/authentication.py. ([1], [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12], [13], [14], [15], [16], [17], [18], [19], [20], [21], [22], [23])