Skip to content

Conversation

@tcnichol
Copy link
Contributor

@tcnichol tcnichol commented Jun 4, 2024

I change the name here since the bug affected more than just read only users.

If a user who is not the owner of a dataset searched for files, they would not find files in the dataset.

This is because the user_ids were not updated in the elasticsearch entries for the files.

To fix this, I added a method index_dataset_files which is called after datasets are updated and indexed.

I also checked and a user that is part of a group will find files in the group. Ready for review.

@tcnichol tcnichol linked an issue Jun 4, 2024 that may be closed by this pull request
@tcnichol tcnichol requested review from a team, ddey2, lmarini and longshuicy June 4, 2024 21:18
@tcnichol tcnichol marked this pull request as ready for review June 5, 2024 16:32
@tcnichol tcnichol requested a review from max-zilla as a code owner June 5, 2024 16:32
@tcnichol tcnichol marked this pull request as draft June 5, 2024 18:53
@tcnichol
Copy link
Contributor Author

tcnichol commented Jun 5, 2024

I'm converting to draft again because some issues are coming up with groups. Adding and removing members from groups seems to mean that some users who are in a group that has access to a file or dataset will not get it in search results.

tcnichol added 4 commits June 5, 2024 15:40
when adding a user to a group, elasticsearch is not updated
when adding a group, if there were no read only users and empty list was inserted into the index
fixing indexing for files
@tcnichol
Copy link
Contributor Author

tcnichol commented Jun 8, 2024

Important Note:

I cannot get the shellcheck pre-commit hook to run on my machine. So far I have found no solution - I can install it via brew but if my pre-commit config is not the same as the one in the github repo, it rejects the commit.

So if someone else can please run it as part of the review, thank you very much.

This should be ready to review now.

@lmarini lmarini marked this pull request as ready for review June 13, 2024 14:34
Copy link
Member

@longshuicy longshuicy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you merge in the latest main to fix the pytest failure? Thanks!

@ddey2
Copy link
Member

ddey2 commented Jun 24, 2024

I see this. Could you please check?
Screenshot 2024-06-24 at 1 49 42 PM

@lmarini lmarini added this to the v2.0-beta-3 milestone Jun 28, 2024
Copy link
Member

@ddey2 ddey2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

works well, code looks good.

Copy link
Member

@longshuicy longshuicy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works now.

@longshuicy longshuicy merged commit 1db2333 into main Jun 28, 2024
@longshuicy longshuicy deleted the 1065-read-only-user-cannot-search branch June 28, 2024 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Read Only User or Non Creator User cannot search files

5 participants