-
Notifications
You must be signed in to change notification settings - Fork 36
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
MMT-3907: Fixed Attempting to Update a Collection Permission ACL With Collection From a Different Provider Silently Ignores the User Request #1303
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1303 +/- ##
=======================================
Coverage 97.66% 97.66%
=======================================
Files 362 362
Lines 5601 5608 +7
Branches 1166 1179 +13
=======================================
+ Hits 5470 5477 +7
Misses 130 130
Partials 1 1 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm confused by the solution here, I'm seeing some ui schema changes that I'm unsure the purpose of, but rather than preventing the user from doing something, we're just throwing an error expecting that they clean it up. We have a few pages in the app that use a provider dropdown, why not just use the dropdown to scope the collections that show up and then a vast majority of this PR can be undone.
Done, now basically uses AppContext for setting and getting provider id. |
static/src/js/components/CollectionSelector/__tests__/CollectionSelector.test.jsx
Outdated
Show resolved
Hide resolved
… Collection From a Different Provider Silently Ignores the User Request
…when providerId changes.
…erId through uischema
static/src/js/components/PermissionForm/__tests__/PermissionForm.test.jsx
Show resolved
Hide resolved
static/src/js/components/CollectionSelector/__tests__/CollectionSelector.test.jsx
Show resolved
Hide resolved
static/src/js/components/PermissionForm/__tests__/PermissionForm.test.jsx
Outdated
Show resolved
Hide resolved
…new ACL (worked on an update just not new)
Overview
What is the feature?
As part of the process of testing saving ACLs with more than 20 selected collections (MMT-3895), there are some cases where trying to add collections to the selected collection list does not work properly.
In these cases, the collection gets added to the selected collection list and even when you click submit, you get a successful response back stating the ACL was saved properly. But, when you look at the ACL permissions page, the added collections are not there.
The issue is the user is allowed to add any collection to the selected collection list, but the only ones that will work is those collections in the same provider as the ACL.
What is the Solution?
If the user is trying to update the ACL, we know the provider, so the solution is to just simply filter the available provider list by the ACL's provider so they can't choose an collection outside of their provider.
If the user is trying to create a new ACL, we do not know the provider until submission, so the solution is to run a check to verify that the selected collections match the selected provider associated with the ACL.
What areas of the application does this impact?
Collection Permissions
Testing
Try editing an existing ACL permission, the available collections list should be filtered by the ACL's provider id.
Try creating a new ACL permission, the available collection list should show all collections (not filtered by any provider id). But when you submit, the UI will ask you for the provider and then a check will occur to make sure all selected collections match that provider id. If they do not, it will produce an error.
Checklist