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

Fix backend sharing bug #18942

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from
Open

Conversation

jdavcs
Copy link
Member

@jdavcs jdavcs commented Oct 4, 2024

This is part of decoupling role names from user email addresses.

Bug: after a user's email is modified, sharing roles cannot be retrieved for that user:

  • role is initially created with name=f"Sharing role for: {', '.join(u.email for u in users)}"
  • ...and retrieved based on (Role.name).like(f"Sharing role for: %{user.email}%")

The solution here is to retrieve based on the association defined via the UserRoleAssociation model.

How to test the changes?

(Select all options that apply)

  • I've included appropriate automated tests.
  • This is a refactoring of components with existing test coverage.
  • Instructions for manual testing are as follows:
    1. Run the new unit test without the commit with the fix
    2. Apply commit with the fix and rerun the test.

License

  • I agree to license these and all my past contributions to the core galaxy codebase under the MIT license.

@jdavcs jdavcs added kind/bug area/database Galaxy's database or data access layer area/sharing labels Oct 4, 2024
@jdavcs jdavcs requested a review from a team October 4, 2024 18:19
@github-actions github-actions bot added this to the 24.2 milestone Oct 4, 2024
@jdavcs jdavcs marked this pull request as draft October 4, 2024 18:28
@jdavcs jdavcs marked this pull request as ready for review October 4, 2024 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/database Galaxy's database or data access layer area/sharing kind/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant