-
-
Notifications
You must be signed in to change notification settings - Fork 217
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
Rc/location update warnings #35379
base: master
Are you sure you want to change the base?
Rc/location update warnings #35379
Conversation
In the second commit "update page contexts for editing mobile and web users" should have been "update initial page data" |
} | ||
}); | ||
|
||
const noCommonLocationWarning = $(".no-common-location"); |
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 think an id would be more appropriate than a class to identify a single element.
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.
agreed, changed here fce3940
return dm.assigned_location_ids; | ||
} | ||
}); | ||
let shareLocations = false; |
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 would have expected can_access_all_locations
to be part of this calculation. To me it looks like there are two mechanisms that hide the warning can_access_all_locations
for including the divs in the dom and this to hid the divs if they are present. Is that correct?
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.
can_access_all_locations
decides whether to include the divs in the dom, that's correct.
shareLocations
is updated when the selection changes in the UI before the form is submitted. So if the two users share only one location and the user making the changes removes that location from the dropdown, shareLocations
will be set to false and the warning div will be shown.
catch up to base branch
catch up to base
Product Description
The warning text is specific to the scenario that triggered the warning.
Warnings are read aloud by screen reader if a screen reader is being used.
Technical Summary
Jira Ticket
When making changes to assigned location of location restricted users, the user making the changes can lose access to the user they are editing and the user being edited can lose access to CommCare altogether.
Safety Assurance
Safety story
Tested locally and on staging.
This only handles whether to show a warning depending on the selections made in the UI and does not make any changes to users/location data.
Automated test coverage
QA Plan
no QA planned
Rollback instructions
Labels & Review