Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limit the amount of users exposed by the repository admin screen #4382

Merged
merged 8 commits into from
Feb 7, 2023

Conversation

jorg-vr
Copy link
Contributor

@jorg-vr jorg-vr commented Feb 3, 2023

This pull request stops the repository admin sceen from leaking all users.

All users can still be found by typing a specific enough query, but the full list is no longer loaded by default. This is a compromise between usability and privacy.

Results are only returned if at least three characters are used as filter and at most 10 results are shown at any time

image
image
image
image

Part of #4362

@jorg-vr jorg-vr added the bug Something isn't working label Feb 3, 2023
@jorg-vr jorg-vr self-assigned this Feb 3, 2023
@jorg-vr jorg-vr marked this pull request as ready for review February 3, 2023 13:30
@jorg-vr jorg-vr requested a review from a team as a code owner February 3, 2023 13:30
@jorg-vr jorg-vr requested review from bmesuere and niknetniko and removed request for a team February 3, 2023 13:30
@jorg-vr jorg-vr marked this pull request as draft February 3, 2023 15:00
@jorg-vr jorg-vr marked this pull request as ready for review February 3, 2023 16:11
@jorg-vr jorg-vr requested a review from niknetniko February 3, 2023 16:11
@bmesuere bmesuere added the deploy mestra Request a deployment on mestra label Feb 4, 2023
@bmesuere bmesuere temporarily deployed to mestra February 4, 2023 09:55 — with GitHub Actions Inactive
@github-actions github-actions bot removed the deploy mestra Request a deployment on mestra label Feb 4, 2023
@bmesuere bmesuere temporarily deployed to naos February 4, 2023 10:14 — with GitHub Actions Inactive
Copy link
Member

@bmesuere bmesuere left a comment

Choose a reason for hiding this comment

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

  • I think we want a different empty state message when the page is loaded. It now says "Er werden te veel gebruikers gevonden. Gebruik de zoekbalk om de resultaten te filteren." but I didn't do anything yet. Something like "Enter at least x characters to search for users by first or last name" seems appropriate.
  • If the list is truncated, "Er werden te veel gebruikers gevonden" seems strange. I would say explicitly that only the first few results are shown. Maybe also something like "Can't find who you're looking for? Try searching on their full name or filter by institution"
  • The sort by length seems a bit strange/random on naos. I think we can just sort alphabetically now that we have an institution filter?

app/controllers/users_controller.rb Outdated Show resolved Hide resolved
@jorg-vr jorg-vr requested a review from bmesuere February 6, 2023 09:01
config/locales/views/users/en.yml Outdated Show resolved Hide resolved
db/schema.rb Outdated
Comment on lines 107 to 109
t.index ["series_id", "started", "user_id", "last_submission_id"], name: "index_as_on_series_and_started_and_user_and_last_submission"
t.index ["series_id"], name: "fk_rails_1bc42c2178"
t.index ["started", "user_id", "last_submission_id"], name: "index_as_on_started_and_user_and_last_submission"
t.index ["started", "user_id", "series_id"], name: "index_activity_statuses_on_started_and_user_id_and_series_id"
Copy link
Member

Choose a reason for hiding this comment

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

This was probably included by accident?

jorg-vr and others added 2 commits February 7, 2023 11:02
Co-authored-by: Bart Mesuere <Bart.Mesuere@UGent.be>
@jorg-vr jorg-vr merged commit 2bc87b6 into develop Feb 7, 2023
@jorg-vr jorg-vr deleted the fix/close-user-list-leak branch February 7, 2023 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants