Make group auth check case-insensitive (including Copilot's recommendations regarding null pointer checks) #11687
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.
Same as pull request #11610 but also including the Copilot's recommendations regarding null pointer checks.
@inodb and @haynescd
Because the user "akulyakhtin" is not answering and not changing the code at his own pull request 11610, I have created a pull request on my on now.
Description is still the same:
Closes #11609
This request fixes the following issue:
if we have set authorities=true in app properties
and if we have a group value in cancer_study table sample_group
and if we have authority sample_group (or cbioportal:sample_group, depending on the filtering option) in authorities table for a user.
Then the access to that cancer study is not granted to the user even though the authroity matches the cancer study group.
This happens because authorities are convereted to upper case while cancer group names are not.
To fix this the pull request changes Collections.disjoint (which is case-sensitive) to a case-insensitive utility method caseInsensitiveDisjoint.