Fix country dashboard sharing: restrict access to project users/groups#581
Fix country dashboard sharing: restrict access to project users/groups#581Ramon-Jimenez wants to merge 9 commits intodevelopmentfrom
Conversation
Country dashboards were set to public read+write access (rw------), allowing any user to see all country dashboards regardless of their project assignments. Now sharing is restricted to the aggregated users and user groups from all projects within the country, matching the pattern already used by project dashboards via ProjectSharing. Adds migration 10 to regenerate all existing country dashboards with the corrected sharing settings. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
BundleMonNo change in files bundle size Groups updated (1)
Final result: ✅ View report in BundleMon website ➡️ |
eperedo
left a comment
There was a problem hiding this comment.
Looks good, but the migration will take a lot of time. Check my comment for further details
| const config = await getConfig(api); | ||
| const projectIds = await getProjectIds(api, config, debug); | ||
| debug(`Projects count: ${projectIds.length}`); | ||
| await saveProjectDashboards(api, config, debug, projectIds); |
There was a problem hiding this comment.
This migration is working, but it'll take a lot of time (about 2.5 hours) because it's fetching all the projects (including all the metadata related to these) and then updating the new permissions for all the dashboards.
|
I've added the script:
By default it'll run in
It take around 2 minutes to update all the country dashboards. |
…data-management-app into fix/country-dashboard-sharing
Summary
rw------), allowing any user to see and edit all country dashboards regardless of their project assignments.CountryDashboard.getSharing()to setpublicAccess: "--------"and restrict access to the aggregated users and user groups from all projects within that country — matching the pattern already used by project dashboards viaProjectSharing.Closes ClickUp task: #869cxxxvv
Test plan
🤖 Generated with Claude Code