ETT-432 Incorrect FT Facet for CAA Users#186
Merged
Conversation
Initial changes to make testing easier:
- `Auth::Auth::__get_scoped_affiliations` checks `allowed_affiliations` for definedness before using it as a regex.
- Remove `umall` from `RightsGlobals::g_access_requires_holdings_attribute_values` since it shows up as a lone value in fq and is not needed.
- Numerically sort the return value of `Access::Rights::_get_final_access_status_attr_list` (and hence its derivatives)
so rights-related Solr queries show up in a canonical form.
…gs_attribute_value` which should only apply to `LIBRARY_IPADDR_USER`. As a result there is only one case where we see `ht_heldby_brlm` and that is with said user and `op` rights. - Fix up tabs-spaces muddle in `...Facets::__get_holdings_qualified_string`
… checking holdings for some rights. - Fix up tabs-spaces muddle in `...Facets::__HELPER_get_Solr_fulltext_filter_query_arg`
aelkiss
reviewed
Feb 19, 2026
Member
aelkiss
left a comment
There was a problem hiding this comment.
I'm very happy to see the "new years hack" go; the actual change for CAA users is pleasantly straightforward. I think what the tests are testing is reasonable, but see comments inline especially around more clearly documenting expected behavior and handling of certain rights attributes.
Add non-US tests for most of the fulltext facet user types. Document known bugs and expected results.
Add note on how to fix the geoip-related bugs.
aelkiss
approved these changes
Feb 25, 2026
Member
aelkiss
left a comment
There was a problem hiding this comment.
The follow-ups you listed make sense; the additional comments in the expectations in the tests look good.
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.
I believe the FT facets should be mostly right at this point. Worth several careful looks at the expected values in the Facets.t tests.
Available on dev-2.
Initial changes to make testing easier:
Auth::Auth::__get_scoped_affiliationschecksallowed_affiliationsfor definedness before using it as a regex. Cuts down on warnings in the "not logged in" case.umallfromRightsGlobals::g_access_requires_holdings_attribute_valuessince it shows up as a lone value in fq and is not needed. I think it's obsolete now? In any case, access does not depend on holdings.Access::Rights::_get_final_access_status_attr_list(and hence its derivatives) so rights-related Solr queries show up in a canonical form.The major highlights:
Test::Userclass in the spirit of mdp-lib access tests. It's not very pretty but I think we need something like this.oprights toLIBRARY_IPADDR_USER(for other user types it's a simple "held")HT_TOTAL_USER&HT_STAFF_USERalong with existingSSD_PROXY_USERlogic (none of them care about holdings)