Open
Conversation
2 tasks
Test Results 17 files ±0 17 suites ±0 2h 17m 46s ⏱️ - 3m 40s Results for commit 0b0297c. ± Comparison against base commit 59a42ad. This pull request removes 274 and adds 274 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
51a7b33 to
a81a2ba
Compare
a81a2ba to
b6ce4dd
Compare
b6ce4dd to
0b0297c
Compare
cjcolvar
reviewed
Jul 24, 2024
Member
cjcolvar
left a comment
There was a problem hiding this comment.
I think it would be good to add tests to ensure that all cases are being covered as expected. Checking size and inclusion of all items from new permissions in old permissions could miss items in old permissions which have been removed. I see that you're casting @saved_permissions into a set so would set comparison work (@saved_permissions.to_set == new_permissions.to_set) ?
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.
Fixes
Fixes #6537
Summary
When saving a work in Sirenia, users consistently receive a prompt to verify changes to visibility, even when they did not make any edits to visibility. This is due to an underlying bug in comparing saved permissions with new permissions.
Guidance for testing, such as acceptance criteria or new user interface behaviors:
Type of change (for release notes)
notes-bugfixBug FixesDetailed Description
the underlying problem is in this method in
app/controllers/concerns/hyrax/works_controller_behavior.rb:when using Valkyrie, the array comparison between
@saved_permissionsandHyrax::AccessControl.for(resource: curation_concern).permissionsis always returning false even when permissions are exactly the same, because order in the two arrays is not always the same.Changes proposed in this pull request:
@samvera/hyrax-code-reviewers