-
Notifications
You must be signed in to change notification settings - Fork 293
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
Any change to sharing settings triggers sharing notices #5375
Comments
@hussain-t I just tweaked one point of the AC specifically around "a shared ownership module". |
@hussain-t, thanks for the initial approach, but I think it would be better if we implement this functionality as a new selector in the sharing settings datastore. We already have original and changed versions of sharing settings in the store state, so we can compare them and find if changes grand access permissions to more users or not. We can call the new selector something like |
Thanks, @eugene-manuilov. I have updated the IB. |
Let's call it
I think this is not sufficient to check just length of shared roles arrays because I can deselect previously selected role and select a new one to grant view permissions to new users. So we can rephrase it to say something like
Same here, we can just say
Don't we need to remove |
Thanks, @eugene-manuilov 👍 I have updated the IB.
No, it's been used in other places for conditionally applying class, etc. |
Thanks, @hussain-t. IB ✔️ |
QA Update: ✅Verified:
|
I just raised #5487 which is somewhat related to this – I thought that problem was caused by this issue, but now that this one is fixed it appears the other still remains. |
Bug Description
Bug bash issue: https://app.asana.com/0/1202258919887896/1202436389160088 please refer to Asana issue for background
The notice in the bottom of the sharing settings modal is currently being triggered by what seems to be any change to sharing settings. Since the notice is about informing the user that data will be shared through their account, it should probably only be shown under more limited conditions:
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
Implementation Brief
assets/js/googlesitekit/modules/datastore/sharing-settings.js
, create a new selectorhaveSharingSettingsExpanded
with the following changes:key
as a required param.false
by default.sharingSettings
andsavedSharingSettings
from the state.undefined
if either one is not loaded yet.management
changes, have a condition to check ifkey
is equal tomanagement
.true
if the management setting for any module has been changed fromowner
toall_admins
.sharedRoles
changes, have a condition to check ifkey
is equal tosharedRoles
.true
if sharing settings for any module contain roles that haven't been previously selected.assets/js/components/dashboard-sharing/DashboardSharingSettings/Notice.js
:haveSharingSettingsExpanded
selector, create two calls; one is by passingmanagement
as an argument, and the other issharedRoles
.isEditingManagement
andeditingUserRolesSlug
.assets/js/components/dashboard-sharing/DashboardSharingSettings/constants.js
, removeEDITING_MANAGEMENT_KEY
.EDITING_MANAGEMENT_KEY
in the DS related components.Test Coverage
assets/js/components/dashboard-sharing/DashboardSharingSettings/index.test.js
, add test cases to cover the above scenarios.haveSharingSettingsExpanded
QA Brief
management
fromowner
toall_admins
.management
fromall_admins
toowner
.Note: The IB states to add test cases to cover the scenarios; however, the
DashboardSharingSettings
component isn't responsible for rendering theFooter
component. Rather,DashboardSharingSettingsButton
renders theFooter
. However, we don't have tests for that component.Changelog entry
The text was updated successfully, but these errors were encountered: