Skip to content

Commit 1080e22

Browse files
luccasmmgsteveonimpolidoriMuhammadIsmailShahzad
authored
Sync staging prod may 22 (#694)
* [sitemap]: remove diallow all from sitemap * Add harvest configs and supervisorctl * Force rerun deployment * Force rerun deployment * empty * Fix supervisord file permissions * Add harvester to initial plugins * Trigger CI * Searchcard (#605) * [sitemap]: remove diallow all from sitemap * update searchcard style * add aria-label to the footer * update test * update * update dataset card * Fix supervisord.conf path * Fix supervisord file path in Dockerfile.dev * Revert "Merge branch 'dev' of https://github.com/wri/wri-odp into dev" (#608) This reverts commit 09e0761, reversing changes made to c54ef01. Co-authored-by: Luccas Mateus <[email protected]> * Re apply multiple applications (#609) * Revert "Merge branch 'dev' of https://github.com/wri/wri-odp into dev" This reverts commit 09e0761, reversing changes made to c54ef01. * Reapply "Merge branch 'dev' of https://github.com/wri/wri-odp into dev" This reverts commit 9399810. --------- Co-authored-by: Luccas Mateus <[email protected]> * Force rerun deployment * Add log output after unit tests * Move error logs in GitHub Actions * Improve group package count api call (#611) * [sitemap]: remove diallow all from sitemap * empty * improve groups package count fetch * Move log print; Fix timeout * update auto-url field in dataset form * ODP-399 (#614) * ODP-399 * Fix build * scroll to the top on state change (#615) * scroll to the top on stte change * update pagination * Swap back to Azure SSO from Okta SSO * ODP-397 (#617) * Fix requesteds by Nesma * ODP-380 (#620) * Allow CORS in tests * Remove unnecessary build section from docker-compose.test * Update docs * update application and others (#624) * update images and doc (#623) * update userdoc search page * Applications docs * [ODP-400] Homepage search bar improvements (#612) * update search field style * update search field * update color contrast * update cta button (#627) * Fix build * User info (#628) * Progress * Only misiing csv export * Almost finished * Add docs * Tests * Fix test * Orttho * Rm poetry * QA Fixes * Fix ortto signup (Only when user accepts) * Fixes onSuccess mutation download batch * Downgrade git * QA Fixes * Delete test thats no longer relevant * Fix test cost splitting * Fix test cost splitting * Rm console.log * Change wording for button * Marketing + Vulnerability * fix issue with weird scrolling behaviour (#629) * fix issue with weird scrolling bahaviour * add height for mobile scroll * Update to have timestamp * Fix vulnerability * [run_unit_tests.sh] Give verbose output * fix search input alignment * update search input fields * Kim comments * [main.yml] Temp. stop build logs * Fix vulnerability * [main.yml] Fix broken build * [main.yml] Fix broken build * [main.yml] Typo fix * [main.yml] Fix image name * Fix alignment recent added/updated * Fix broken link * ODP-397 Kim request * update dataset edit url placeholder (#631) * [docker-compose.test.yml] Temp. use redis 3 * [main.yml] Run build * [main.yml] Disable build * [docker-compose.test.yml] Add redis retry * [docker-compose.test.yml] Dont run frontend * [main.yml] Don't run frontend docker * [docker-compose.test.yml] Remove redis health check * [docker-compose.test.yml] Remove datapusher temporarily * [docker-compose.test.yml] Fix redis container name * [run_unit_tests.sh] Run traceback as long * [run_unit_tests.sh] Update test command * Small UI Fixes * Fix font size * [supervisor.harvest.conf] Temp. run harvester as root * [main.yml] Run the build and push the images * [docker-compose.test.yml] Revert changes * [main.yml] Run tests * [supervisor.*.conf] Use env variable to dynamically set user based on user running CKAN * update filter scrolltop (#633) * Kim requests(Download id, new fomratting date) * Fix fonts * Fix timezone * Ortto forms * Fix timezone * Fix font size * Fix typo * Trigger CI * Fix build * Sync dev staging 02 17 25 (#639) * Harvest dynamic configs pt. 2 (#635) * Update ckanext-s3filestore branch * Fix typo * Update layer manager to use wri release * Fix Dockerfile * [ODP-235] Allow private and hidden teams (#537) * update teams create and edit form * update organization list api * update schema * update api * remove extras * fix type errors * update user_list_wri to support private teams * fix api call * remove chained action * add visibility * fix breaking changes * update env * update env plugin * fix test * update test * add visibility to org during dataset edit * add test for private teams * remove logs * update private team functionality * Merge branch 'priveateams' of https://github.com/wri/wri-odp into priveateams * Merge branch 'priveateams' of https://github.com/wri/wri-odp into priveateams * resolve conflict * undo changes * update organization patch and create * add private attribute to fetched orgs * update organization_list sql logic * improve team visbility * improve error message * update private team test * update failing test * update test * update settings * update test * update test * update test * update test * update test * update test * update test * update docker compose * add tooltip * update test * add padlock to private teams * add back auth plugin * Harvest config feb 03 2025 (#637) * Fix variable replacement in harvest worker configs and switch from /tmp path to /srv/app * Add whoami output to start_ckan.sh * [download_event.py] Add missing closing parenthesis * Set supervisor home by variable * Fix harvest config permissions * Use CKAN_IMAGE variable instead of local image name * Handle sed supervisor changes as root; Add start_ckan sub-script * Revert sub-script; Always use user ckan for supervisor * Fix sed commands * Use root user with ckan home for supervisord * Revert "Harvest config feb 03 2025 (#637)" This reverts commit e68155a. * Harvest dynamic configs pt. 3 (#638) * Add supercronic for harvest run command (#640) --------- Co-authored-by: Luccas Mateus <[email protected]> Co-authored-by: Stephen Oni <[email protected]> * Sync dev staging 03 03 25 (#644) * Sync dev to Staging Mar 3, 2025 * Fix typo * [ODP-235] Allow private and hidden teams (#537) * update teams create and edit form * update organization list api * update schema * update api * remove extras * fix type errors * update user_list_wri to support private teams * fix api call * remove chained action * add visibility * fix breaking changes * update env * update env plugin * fix test * update test * add visibility to org during dataset edit * add test for private teams * remove logs * update private team functionality * Merge branch 'priveateams' of https://github.com/wri/wri-odp into priveateams * Merge branch 'priveateams' of https://github.com/wri/wri-odp into priveateams * resolve conflict * undo changes * update organization patch and create * add private attribute to fetched orgs * update organization_list sql logic * improve team visbility * improve error message * update private team test * update failing test * update test * update settings * update test * update test * update test * update test * update test * update test * update test * update docker compose * add tooltip * update test * add padlock to private teams * add back auth plugin * Harvest config feb 03 2025 (#637) * Fix variable replacement in harvest worker configs and switch from /tmp path to /srv/app * Add whoami output to start_ckan.sh * [download_event.py] Add missing closing parenthesis * Set supervisor home by variable * Fix harvest config permissions * Use CKAN_IMAGE variable instead of local image name * Handle sed supervisor changes as root; Add start_ckan sub-script * Revert sub-script; Always use user ckan for supervisor * Fix sed commands * Use root user with ckan home for supervisord * Revert "Harvest config feb 03 2025 (#637)" This reverts commit e68155a. * Harvest dynamic configs pt. 3 (#638) * Add supercronic for harvest run command (#640) * Fix alignment * Fix build * Fix build * [ODP-414] add email notification when download-flow fails (#641) * add email notification when flow fails * update error notification * empty * remove pgclient version * update libpq --------- Co-authored-by: Michael Polidori <[email protected]> * Update Members permission to team form + ODP-370 (#642) * members can not * update role: Editor can create sub-team and admin moving subteam from public to private should not throw error * disabled Public option if parent is private * Trigger CI --------- Co-authored-by: Luccas Mateus <[email protected]> * Fix shapely imports --------- Co-authored-by: Luccas Mateus <[email protected]> Co-authored-by: Stephen Oni <[email protected]> * Sync dev staging mar 19 (#653) * Harvest dynamic configs pt. 2 (#635) * Update ckanext-s3filestore branch * Fix typo * Update layer manager to use wri release * Fix Dockerfile * [ODP-235] Allow private and hidden teams (#537) * update teams create and edit form * update organization list api * update schema * update api * remove extras * fix type errors * update user_list_wri to support private teams * fix api call * remove chained action * add visibility * fix breaking changes * update env * update env plugin * fix test * update test * add visibility to org during dataset edit * add test for private teams * remove logs * update private team functionality * Merge branch 'priveateams' of https://github.com/wri/wri-odp into priveateams * Merge branch 'priveateams' of https://github.com/wri/wri-odp into priveateams * resolve conflict * undo changes * update organization patch and create * add private attribute to fetched orgs * update organization_list sql logic * improve team visbility * improve error message * update private team test * update failing test * update test * update settings * update test * update test * update test * update test * update test * update test * update test * update docker compose * add tooltip * update test * add padlock to private teams * add back auth plugin * Harvest config feb 03 2025 (#637) * Fix variable replacement in harvest worker configs and switch from /tmp path to /srv/app * Add whoami output to start_ckan.sh * [download_event.py] Add missing closing parenthesis * Set supervisor home by variable * Fix harvest config permissions * Use CKAN_IMAGE variable instead of local image name * Handle sed supervisor changes as root; Add start_ckan sub-script * Revert sub-script; Always use user ckan for supervisor * Fix sed commands * Use root user with ckan home for supervisord * Revert "Harvest config feb 03 2025 (#637)" This reverts commit e68155a. * Harvest dynamic configs pt. 3 (#638) * Add supercronic for harvest run command (#640) * Fix alignment * Fix build * Fix build * [ODP-414] add email notification when download-flow fails (#641) * add email notification when flow fails * update error notification * empty * remove pgclient version * update libpq --------- Co-authored-by: Michael Polidori <[email protected]> * Upgrade to CKAN 2.11 (#632) * Update setup.py * Update Members permission to team form + ODP-370 (#642) * members can not * update role: Editor can create sub-team and admin moving subteam from public to private should not throw error * disabled Public option if parent is private * Trigger CI --------- Co-authored-by: Luccas Mateus <[email protected]> * Change setup.py and setup.cfg * Fix ckanext-wri install (#643) * Improve resource location design (#646) * Trigger CI * [odp-426]: Add edit icon to dashboard entities (#648) * [odp-426]: Add edit icon to dashboard entities * update schema * Add bulk purge collaborator issue patch (#645) * Increase UWSGI timeouts; Extract URLs from markdown links in learn_more (#649) * Resource location search improvements (#650) * add authorized check to group/teams last node (#651) * Trigger CI * Rm global from DatafileLocation * Trigger CI * enable edit icon for collaborators (#652) * Fix typo * Remove dev helm config values and GH Actions file --------- Co-authored-by: Michael Polidori <[email protected]> Co-authored-by: Stephen Oni <[email protected]> * Sync dev staging mar 26 (#659) * Harvest dynamic configs pt. 2 (#635) * Update ckanext-s3filestore branch * Fix typo * Update layer manager to use wri release * Fix Dockerfile * [ODP-235] Allow private and hidden teams (#537) * update teams create and edit form * update organization list api * update schema * update api * remove extras * fix type errors * update user_list_wri to support private teams * fix api call * remove chained action * add visibility * fix breaking changes * update env * update env plugin * fix test * update test * add visibility to org during dataset edit * add test for private teams * remove logs * update private team functionality * Merge branch 'priveateams' of https://github.com/wri/wri-odp into priveateams * Merge branch 'priveateams' of https://github.com/wri/wri-odp into priveateams * resolve conflict * undo changes * update organization patch and create * add private attribute to fetched orgs * update organization_list sql logic * improve team visbility * improve error message * update private team test * update failing test * update test * update settings * update test * update test * update test * update test * update test * update test * update test * update docker compose * add tooltip * update test * add padlock to private teams * add back auth plugin * Harvest config feb 03 2025 (#637) * Fix variable replacement in harvest worker configs and switch from /tmp path to /srv/app * Add whoami output to start_ckan.sh * [download_event.py] Add missing closing parenthesis * Set supervisor home by variable * Fix harvest config permissions * Use CKAN_IMAGE variable instead of local image name * Handle sed supervisor changes as root; Add start_ckan sub-script * Revert sub-script; Always use user ckan for supervisor * Fix sed commands * Use root user with ckan home for supervisord * Revert "Harvest config feb 03 2025 (#637)" This reverts commit e68155a. * Harvest dynamic configs pt. 3 (#638) * Add supercronic for harvest run command (#640) * Fix alignment * Fix build * Fix build * [ODP-414] add email notification when download-flow fails (#641) * add email notification when flow fails * update error notification * empty * remove pgclient version * update libpq --------- Co-authored-by: Michael Polidori <[email protected]> * Upgrade to CKAN 2.11 (#632) * Update setup.py * Update Members permission to team form + ODP-370 (#642) * members can not * update role: Editor can create sub-team and admin moving subteam from public to private should not throw error * disabled Public option if parent is private * Trigger CI --------- Co-authored-by: Luccas Mateus <[email protected]> * Change setup.py and setup.cfg * Fix ckanext-wri install (#643) * Improve resource location design (#646) * Trigger CI * [odp-426]: Add edit icon to dashboard entities (#648) * [odp-426]: Add edit icon to dashboard entities * update schema * Add bulk purge collaborator issue patch (#645) * Increase UWSGI timeouts; Extract URLs from markdown links in learn_more (#649) * Resource location search improvements (#650) * add authorized check to group/teams last node (#651) * Trigger CI * Rm global from DatafileLocation * Trigger CI * enable edit icon for collaborators (#652) * Fix typo * intgration test for collaborator permission (#654) * enable edit icon for collaborators * add intergration test for dashboard collaborator permission * Improve speed * Improve js * Fix prefetching * Change color of area select tool * Improvements map * Remove edit icon on teams/topic page for editor (#656) * enable edit icon for collaborators * remove editor permision * empty * Fix tests * Fix tests * Fix tests * Fix test * Clear all session storage * Fix tests * Fix tests * Fix private teams tests * Fix cypress.config.js * Fix tests * Fix tests * Fix tests * Fix tests * Rm test-main --------- Co-authored-by: Michael Polidori <[email protected]> Co-authored-by: Stephen Oni <[email protected]> * Sync dev staging apr 14 (#671) * Harvest dynamic configs pt. 2 (#635) * Update ckanext-s3filestore branch * Fix typo * Update layer manager to use wri release * Fix Dockerfile * [ODP-235] Allow private and hidden teams (#537) * update teams create and edit form * update organization list api * update schema * update api * remove extras * fix type errors * update user_list_wri to support private teams * fix api call * remove chained action * add visibility * fix breaking changes * update env * update env plugin * fix test * update test * add visibility to org during dataset edit * add test for private teams * remove logs * update private team functionality * Merge branch 'priveateams' of https://github.com/wri/wri-odp into priveateams * Merge branch 'priveateams' of https://github.com/wri/wri-odp into priveateams * resolve conflict * undo changes * update organization patch and create * add private attribute to fetched orgs * update organization_list sql logic * improve team visbility * improve error message * update private team test * update failing test * update test * update settings * update test * update test * update test * update test * update test * update test * update test * update docker compose * add tooltip * update test * add padlock to private teams * add back auth plugin * Harvest config feb 03 2025 (#637) * Fix variable replacement in harvest worker configs and switch from /tmp path to /srv/app * Add whoami output to start_ckan.sh * [download_event.py] Add missing closing parenthesis * Set supervisor home by variable * Fix harvest config permissions * Use CKAN_IMAGE variable instead of local image name * Handle sed supervisor changes as root; Add start_ckan sub-script * Revert sub-script; Always use user ckan for supervisor * Fix sed commands * Use root user with ckan home for supervisord * Revert "Harvest config feb 03 2025 (#637)" This reverts commit e68155a. * Harvest dynamic configs pt. 3 (#638) * Add supercronic for harvest run command (#640) * Fix alignment * Fix build * Fix build * [ODP-414] add email notification when download-flow fails (#641) * add email notification when flow fails * update error notification * empty * remove pgclient version * update libpq --------- Co-authored-by: Michael Polidori <[email protected]> * Upgrade to CKAN 2.11 (#632) * Update setup.py * Update Members permission to team form + ODP-370 (#642) * members can not * update role: Editor can create sub-team and admin moving subteam from public to private should not throw error * disabled Public option if parent is private * Trigger CI --------- Co-authored-by: Luccas Mateus <[email protected]> * Change setup.py and setup.cfg * Fix ckanext-wri install (#643) * Improve resource location design (#646) * Trigger CI * [odp-426]: Add edit icon to dashboard entities (#648) * [odp-426]: Add edit icon to dashboard entities * update schema * Add bulk purge collaborator issue patch (#645) * Increase UWSGI timeouts; Extract URLs from markdown links in learn_more (#649) * Resource location search improvements (#650) * add authorized check to group/teams last node (#651) * Trigger CI * Rm global from DatafileLocation * Trigger CI * enable edit icon for collaborators (#652) * Fix typo * intgration test for collaborator permission (#654) * enable edit icon for collaborators * add intergration test for dashboard collaborator permission * Improve speed * Improve js * Fix prefetching * Change color of area select tool * Improvements map * Remove edit icon on teams/topic page for editor (#656) * enable edit icon for collaborators * remove editor permision * empty * Fix tests * Fix tests * Fix tests * Fix test * Clear all session storage * Fix tests * Fix tests * Fix private teams tests * Fix cypress.config.js * Fix tests * Fix tests * Fix tests * Fix tests * Fix whitespace wrap on text * Trigger CI * Add group admin email to workflow error mail (#663) * enable edit icon for collaborators * send workflow error to team admin * removed email check * E2etest (#657) * enable edit icon for collaborators * empty * add check to ensure org is actually private * update * update * fix test * update test * empty * update * update test * update test * update test * update test * update test * update test to see if organization create api is truly working * update test * remove other test for now * push update * update env.example * fix test * empty * Fix git vulnerability * Fix git * Add if condition (#664) * [odp-449] Teams Implementation - Root parent Team Edit (#669) * enable edit icon for collaborators * admin should be able to edit root team * ODP-447 (#668) * ODP-447 * Fix build * Fix tests * Fix t ests * Trigger CI * [Dev] Increase proxy-read-timeout to avoid early external request disconnects (#665) * Revert "ODP-447 (#668)" This reverts commit 7c0e465. * Revert "[odp-449] Teams Implementation - Root parent Team Edit (#669)" This reverts commit 7d61dcd. * Rm test-main * Revert ingress changes --------- Co-authored-by: Michael Polidori <[email protected]> Co-authored-by: Stephen Oni <[email protected]> * Trigger CI * Fix ODP-430 on Staging (#677) * Add form-id to download popup * Sync dev staging may 12 (#685) * Harvest dynamic configs pt. 2 (#635) * Update ckanext-s3filestore branch * Fix typo * Update layer manager to use wri release * Fix Dockerfile * [ODP-235] Allow private and hidden teams (#537) * update teams create and edit form * update organization list api * update schema * update api * remove extras * fix type errors * update user_list_wri to support private teams * fix api call * remove chained action * add visibility * fix breaking changes * update env * update env plugin * fix test * update test * add visibility to org during dataset edit * add test for private teams * remove logs * update private team functionality * Merge branch 'priveateams' of https://github.com/wri/wri-odp into priveateams * Merge branch 'priveateams' of https://github.com/wri/wri-odp into priveateams * resolve conflict * undo changes * update organization patch and create * add private attribute to fetched orgs * update organization_list sql logic * improve team visbility * improve error message * update private team test * update failing test * update test * update settings * update test * update test * update test * update test * update test * update test * update test * update docker compose * add tooltip * update test * add padlock to private teams * add back auth plugin * Harvest config feb 03 2025 (#637) * Fix variable replacement in harvest worker configs and switch from /tmp path to /srv/app * Add whoami output to start_ckan.sh * [download_event.py] Add missing closing parenthesis * Set supervisor home by variable * Fix harvest config permissions * Use CKAN_IMAGE variable instead of local image name * Handle sed supervisor changes as root; Add start_ckan sub-script * Revert sub-script; Always use user ckan for supervisor * Fix sed commands * Use root user with ckan home for supervisord * Revert "Harvest config feb 03 2025 (#637)" This reverts commit e68155a. * Harvest dynamic configs pt. 3 (#638) * Add supercronic for harvest run command (#640) * Fix alignment * Fix build * Fix build * [ODP-414] add email notification when download-flow fails (#641) * add email notification when flow fails * update error notification * empty * remove pgclient version * update libpq --------- Co-authored-by: Michael Polidori <[email protected]> * Upgrade to CKAN 2.11 (#632) * Update setup.py * Update Members permission to team form + ODP-370 (#642) * members can not * update role: Editor can create sub-team and admin moving subteam from public to private should not throw error * disabled Public option if parent is private * Trigger CI --------- Co-authored-by: Luccas Mateus <[email protected]> * Change setup.py and setup.cfg * Fix ckanext-wri install (#643) * Improve resource location design (#646) * Trigger CI * [odp-426]: Add edit icon to dashboard entities (#648) * [odp-426]: Add edit icon to dashboard entities * update schema * Add bulk purge collaborator issue patch (#645) * Increase UWSGI timeouts; Extract URLs from markdown links in learn_more (#649) * Resource location search improvements (#650) * add authorized check to group/teams last node (#651) * Trigger CI * Rm global from DatafileLocation * Trigger CI * enable edit icon for collaborators (#652) * Fix typo * intgration test for collaborator permission (#654) * enable edit icon for collaborators * add intergration test for dashboard collaborator permission * Improve speed * Improve js * Fix prefetching * Change color of area select tool * Improvements map * Remove edit icon on teams/topic page for editor (#656) * enable edit icon for collaborators * remove editor permision * empty * Fix tests * Fix tests * Fix tests * Fix test * Clear all session storage * Fix tests * Fix tests * Fix private teams tests * Fix cypress.config.js * Fix tests * Fix tests * Fix tests * Fix tests * Fix whitespace wrap on text * Trigger CI * Add group admin email to workflow error mail (#663) * enable edit icon for collaborators * send workflow error to team admin * removed email check * E2etest (#657) * enable edit icon for collaborators * empty * add check to ensure org is actually private * update * update * fix test * update test * empty * update * update test * update test * update test * update test * update test * update test to see if organization create api is truly working * update test * remove other test for now * push update * update env.example * fix test * empty * Fix git vulnerability * Fix git * Add if condition (#664) * [odp-449] Teams Implementation - Root parent Team Edit (#669) * enable edit icon for collaborators * admin should be able to edit root team * ODP-447 (#668) * ODP-447 * Fix build * Fix tests * Fix t ests * Trigger CI * [Dev] Increase proxy-read-timeout to avoid early external request disconnects (#665) * Odp 448 (#670) * ODP-448 * Add extra tests * Fix session leakage * Fix tests * Forgot to commit * Fix tests * Add required indicator for non-sysadmins (#672) * Change data stored in orttho * Fix odp430 (#674) * enable edit icon for collaborators * fix odp-430 * Trigger CI * Add better warning * Add extras to list of defaultvalues (#676) * enable edit icon for collaborators * fix odp-430 * add extras to default value * Form-id * Trigger CI * [Odp 458] create/edit dataset in sub-team public (#678) * enable edit icon for collaborators * extend capacity so editor can create or edit dataset in subteam * editor should be able to see public subteam in organization_list_for_user api * parent team admin should be able to edit subteam public dataset * add missing visbility check: public dataset can not be assigned to private team * reshape logic * update patch * remove log * update test * empty * [ODP-453] Teams Implementation - Edit sub team (private or public) (#675) * Add integration tests * Bump ckanext-hierarchy commit: fix cascading roles * Fix tests * Fix tests * Fix tests * Fix tests * Limit setting private Teams to public only to sysadmins (#679) * Add docs for subpaths (#568) * Add docs for subpaths * Force rerun pipeline * Allow Team Admins public to private permissions (#680) * use sysadmin key to fetch dataset collaborators (#682) * enable edit icon for collaborators * use sysadmin key to fetch dataset collaborators * Hide by default when no viz available * fix: first publish * Fix test * Fix caution max-w * Set create_unowned_dataset to False; Remove dev testing GitHub Actions file * Remove duplicate form-id --------- Co-authored-by: Michael Polidori <[email protected]> Co-authored-by: Stephen Oni <[email protected]> * Sync dev staging may 21 (#689) * Harvest dynamic configs pt. 2 (#635) * Update ckanext-s3filestore branch * Fix typo * Update layer manager to use wri release * Fix Dockerfile * [ODP-235] Allow private and hidden teams (#537) * update teams create and edit form * update organization list api * update schema * update api * remove extras * fix type errors * update user_list_wri to support private teams * fix api call * remove chained action * add visibility * fix breaking changes * update env * update env plugin * fix test * update test * add visibility to org during dataset edit * add test for private teams * remove logs * update private team functionality * Merge branch 'priveateams' of https://github.com/wri/wri-odp into priveateams * Merge branch 'priveateams' of https://github.com/wri/wri-odp into priveateams * resolve conflict * undo changes * update organization patch and create * add private attribute to fetched orgs * update organization_list sql logic * improve team visbility * improve error message * update private team test * update failing test * update test * update settings * update test * update test * update test * update test * update test * update test * update test * update docker compose * add tooltip * update test * add padlock to private teams * add back auth plugin * Harvest config feb 03 2025 (#637) * Fix variable replacement in harvest worker configs and switch from /tmp path to /srv/app * Add whoami output to start_ckan.sh * [download_event.py] Add missing closing parenthesis * Set supervisor home by variable * Fix harvest config permissions * Use CKAN_IMAGE variable instead of local image name * Handle sed supervisor changes as root; Add start_ckan sub-script * Revert sub-script; Always use user ckan for supervisor * Fix sed commands * Use root user with ckan home for supervisord * Revert "Harvest config feb 03 2025 (#637)" This reverts commit e68155a. * Harvest dynamic configs pt. 3 (#638) * Add supercronic for harvest run command (#640) * Fix alignment * Fix build * Fix build * [ODP-414] add email notification when download-flow fails (#641) * add email notification when flow fails * update error notification * empty * remove pgclient version * update libpq --------- Co-authored-by: Michael Polidori <[email protected]> * Upgrade to CKAN 2.11 (#632) * Update setup.py * Update Members permission to team form + ODP-370 (#642) * members can not * update role: Editor can create sub-team and admin moving subteam from public to private should not throw error * disabled Public option if parent is private * Trigger CI --------- Co-authored-by: Luccas Mateus <[email protected]> * Change setup.py and setup.cfg * Fix ckanext-wri install (#643) * Improve resource location design (#646) * Trigger CI * [odp-426]: Add edit icon to dashboard entities (#648) * [odp-426]: Add edit icon to dashboard entities * update schema * Add bulk purge collaborator issue patch (#645) * Increase UWSGI timeouts; Extract URLs from markdown links in learn_more (#649) * Resource location search improvements (#650) * add authorized check to group/teams last node (#651) * Trigger CI * Rm global from DatafileLocation * Trigger CI * enable edit icon for collaborators (#652) * Fix typo * intgration test for collaborator permission (#654) * enable edit icon for collaborators * add intergration test for dashboard collaborator permission * Improve speed * Improve js * Fix prefetching * Change color of area select tool * Improvements map * Remove edit icon on teams/topic page for editor (#656) * enable edit icon for collaborators * remove editor permision * empty * Fix tests * Fix tests * Fix tests * Fix test * Clear all session storage * Fix tests * Fix tests * Fix private teams tests * Fix cypress.config.js * Fix tests * Fix tests * Fix tests * Fix tests * Fix whitespace wrap on text * Trigger CI * Add group admin email to workflow error mail (#663) * enable edit icon for collaborators * send workflow error to team admin * removed email check * E2etest (#657) * enable edit icon for collaborators * empty * add check to ensure org is actually private * update * update * fix test * update test * empty * update * update test * update test * update test * update test * update test * update test to see if organization create api is truly working * update test * remove other test for now * push update * update env.example * fix test * empty * Fix git vulnerability * Fix git * Add if condition (#664) * [odp-449] Teams Implementation - Root parent Team Edit (#669) * enable edit icon for collaborators * admin should be able to edit root team * ODP-447 (#668) * ODP-447 * Fix build * Fix tests * Fix t ests * Trigger CI * [Dev] Increase proxy-read-timeout to avoid early external request disconnects (#665) * Odp 448 (#670) * ODP-448 * Add extra tests * Fix session leakage * Fix tests * Forgot to commit * Fix tests * Add required indicator for non-sysadmins (#672) * Change data stored in orttho * Fix odp430 (#674) * enable edit icon for collaborators * fix odp-430 * Trigger CI * Add better warning * Add extras to list of defaultvalues (#676) * enable edit icon for collaborators * fix odp-430 * add extras to default value * Form-id * Trigger CI * [Odp 458] create/edit dataset in sub-team public (#678) * enable edit icon for collaborators * extend capacity so editor can create or edit dataset in subteam * editor should be able to see public subteam in organization_list_for_user api * parent team admin should be able to edit subteam public dataset * add missing visbility check: public dataset can not be assigned to private team * reshape logic * update patch * remove log * update test * empty * [ODP-453] Teams Implementation - Edit sub team (private or public) (#675) * Add integration tests * Bump ckanext-hierarchy commit: fix cascading roles * Fix tests * Fix tests * Fix tests * Fix tests * Limit setting private Teams to public only to sysadmins (#679) * Add docs for subpaths (#568) * Add docs for subpaths * Force rerun pipeline * Allow Team Admins public to private permissions (#680) * use sysadmin key to fetch dataset collaborators (#682) * enable edit icon for collaborators * use sysadmin key to fetch dataset collaborators * Hide by default when no viz available * fix: first publish * Fix test * Fix caution max-w * Update package_update auth for editor (#687) * enable edit icon for collaborators * update auth: editor should be able to edit public dataset * update test * empty * remove package * Add tags to prefect tasks (#688) * Add tags to prefect tasks * Add FLOW_DEPLOYMENT_ENV variable to test yaml * Fix conflicts --------- Co-authored-by: Michael Polidori <[email protected]> Co-authored-by: Stephen Oni <[email protected]> * Sync staging prod --------- Co-authored-by: steveoni <[email protected]> Co-authored-by: Michael Polidori <[email protected]> Co-authored-by: Muhammad Ismail Shahzad <[email protected]>
1 parent 95a8bfb commit 1080e22

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+2238
-1164
lines changed

ckan-backend-dev/.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ CKAN_SMTP_PASSWORD=testpassword
5959
CKAN_SMTP_MAIL_FROM=ckan@localhost
6060
TZ=UTC
6161
CKAN_INI=/srv/app/production.ini
62-
CKAN__AUTH__CREATE_UNOWNED_DATASET=True
62+
CKAN__AUTH__CREATE_UNOWNED_DATASET=False
6363
CKAN__AUTH__ALLOW_DATASET_COLLABORATORS=True
6464
CKAN__AUTH__ALLOW_ADMIN_COLLABORATORS=True
6565
CKAN__AUTH__ALLOW_COLLABORATORS_TO_CHANGE_OWNER_ORG=True

ckan-backend-dev/ckan/Dockerfile.dev

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ RUN pip3 install -e 'git+https://github.com/ckan/ckanext-scheming.git@5ce30cf285
3434
pip3 install httpretty && \
3535
pip3 install -e 'git+https://github.com/datopian/ckanext-auth.git@okta#egg=ckanext-auth' && \
3636
pip3 install -r 'https://raw.githubusercontent.com/datopian/ckanext-auth/okta/requirements.txt' && \
37-
pip3 install -e 'git+https://github.com/datopian/ckanext-hierarchy.git@wri#egg=ckanext-hierarchy' && \
37+
pip3 install -e 'git+https://github.com/datopian/ckanext-hierarchy.git@5d069a5d032ba384f43d266fc397a0aa0a4b444c#egg=ckanext-hierarchy' && \
3838
pip3 install -e 'git+https://github.com/datopian/[email protected]#egg=ckanext-issues' && \
3939
# Required by ckanext-issues, but it's no longer included in any of the requirements files or the subdependencies
4040
pip3 install mock && \

ckan-backend-dev/ckan/patches/ckan/01_roles.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ diff --git a/ckan/ckan/authz.py b/ckan/ckan/authz.py
77
if _has_user_permission_for_groups(user_id, permission, [group_id]):
88
return True
99
- capacities = check_config_permission('roles_that_cascade_to_sub_groups')
10-
+ capacities = ['admin']
10+
+ capacities = ['admin', 'editor']
1111
assert isinstance(capacities, list)
1212
# Handle when permissions cascade. Check the user's roles on groups higher
1313
# in the group hierarchy for permission.

ckan-backend-dev/docker-compose.dev.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ services:
6969
- PREFECT_API_URL=http://127.0.0.1:4200/api
7070
- PREFECT_SERVER_API_HOST=0.0.0.0
7171
- PREFECT_API_DATABASE_CONNECTION_URL=postgresql+asyncpg://ckandbuser:ckandbpassword@db/prefect
72+
- FLOW_DEPLOYMENT_ENV=dev
7273
ports:
7374
- "0.0.0.0:4200:4200"
7475
healthcheck:
@@ -92,6 +93,7 @@ services:
9293
- S3_SECRET_KEY_ID=${MINIO_ROOT_PASSWORD}
9394
- S3_BUCKET_NAME=ckan
9495
- S3_BUCKET_REGION=us-east-1
96+
- FLOW_DEPLOYMENT_ENV=dev
9597
depends_on:
9698
prefect:
9799
condition: service_healthy

ckan-backend-dev/docker-compose.test.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ services:
9494
- PREFECT_API_URL=http://prefect:4200/api
9595
- PREFECT_SERVER_API_HOST=0.0.0.0
9696
- PREFECT_API_DATABASE_CONNECTION_URL=postgresql+asyncpg://ckandbuser:ckandbpassword@db/prefect
97+
- FLOW_DEPLOYMENT_ENV=test
9798
ports:
9899
- "0.0.0.0:4200:4200"
99100
healthcheck:
@@ -120,6 +121,7 @@ services:
120121
- S3_SECRET_KEY_ID=${MINIO_ROOT_PASSWORD}
121122
- S3_BUCKET_NAME=ckan
122123
- S3_BUCKET_REGION=us-east-1
124+
- FLOW_DEPLOYMENT_ENV=test
123125
depends_on:
124126
prefect:
125127
condition: service_healthy

ckan-backend-dev/src/ckanext-wri/ckanext/wri/logic/action/get.py

Lines changed: 38 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1007,11 +1007,9 @@ def organization_list_wri(context: Context, data_dict: DataDict):
10071007
user_orgs = None
10081008
if not user:
10091009
private_orgs = get_private_organizations(context)
1010-
log.warning(f"Private orgs: {private_orgs} \n\n {orgs}")
10111010

10121011
if user:
10131012
user_orgs = orgs
1014-
log.warning(f"User orgs: {user_orgs} \n\n {orgs}")
10151013
results = get_hierarchy_group(context, orgs, "organization", q, private_orgs, user_orgs)
10161014
return results
10171015

@@ -1409,24 +1407,49 @@ def organization_list_for_user(context: Context,
14091407
.filter(model.Member.state == 'active') \
14101408
.join(model.Group)
14111409

1412-
group_ids: set[str] = set()
1410+
14131411
roles_that_cascade = cast(
14141412
"list[str]",
14151413
authz.check_config_permission('roles_that_cascade_to_sub_groups')
14161414
)
1415+
group_extra_alias = aliased(model.GroupExtra)
1416+
public_groups_query = (
1417+
model.Session.query(model.Group.id)
1418+
.outerjoin(group_extra_alias, model.Group.id == group_extra_alias.group_id)
1419+
.filter(
1420+
_or_(
1421+
_and_(
1422+
group_extra_alias.key == 'visibility',
1423+
group_extra_alias.value == 'public'
1424+
),
1425+
group_extra_alias.key == None
1426+
)
1427+
)
1428+
)
1429+
public_group_ids = {gid for gid, in public_groups_query.all()}
1430+
group_ids: set[str] = set()
14171431
group_ids_to_capacities: dict[str, str] = {}
14181432
for member, group in q.all():
1433+
group_ids.add(group.id)
1434+
group_ids_to_capacities[group.id] = member.capacity
1435+
children_group_ids = [
1436+
grp_tuple[0] for grp_tuple
1437+
in group.get_children_group_hierarchy(type='organization')
1438+
]
14191439
if member.capacity in roles_that_cascade:
1420-
children_group_ids = [
1421-
grp_tuple[0] for grp_tuple
1422-
in group.get_children_group_hierarchy(type='organization')
1423-
]
1440+
14241441
for group_id in children_group_ids:
1442+
group_ids.add(group_id)
14251443
group_ids_to_capacities[group_id] = member.capacity
1426-
group_ids |= set(children_group_ids)
1444+
else:
1445+
for group_id in children_group_ids:
1446+
if group_id in public_group_ids:
1447+
group_ids.add(group_id)
1448+
group_ids_to_capacities[group_id] = member.capacity
14271449

1428-
group_ids_to_capacities[group.id] = member.capacity
1429-
group_ids.add(group.id)
1450+
1451+
# group_ids_to_capacities[group.id] = member.capacity
1452+
# group_ids.add(group.id)
14301453

14311454
if not group_ids:
14321455
return []
@@ -1449,6 +1472,8 @@ def organization_list_for_user(context: Context,
14491472

14501473

14511474

1475+
1476+
14521477
@logic.side_effect_free
14531478
def organization_list(context: Context,
14541479
data_dict: DataDict) -> ActionResult.OrganizationList:
@@ -1782,21 +1807,10 @@ def organization_patch(context, data_dict):
17821807
if not isSysadmin:
17831808
temp_context = {"model": context["model"], "session": context["session"], "user": context["user"]}
17841809
old_org = get_action("organization_show")(temp_context, data_dict)
1785-
old_parent = old_org.get("groups", [])
1786-
if len(old_parent) == 0 or data_dict.get("parent") is None:
1787-
raise ValidationError({"message": _("You can't edit or create a Parent Team")})
17881810
if old_org.get("visibility", "public") == "private" and visibility == "public":
17891811
raise ValidationError({"message":
1790-
_("Team has private visibility and cannot be updated; Only sysadmin can update private team")
1812+
_("Team has private visibility and cannot be updated; Only sysadmin can switch private to public")
17911813
})
1792-
1793-
if visibility == "private":
1794-
users = old_org.get("users", [])
1795-
if users:
1796-
c_user = str(user)
1797-
user_capacity = [user.get("capacity") for user in users if user.get("name") == c_user]
1798-
if "admin" not in user_capacity:
1799-
raise ValidationError({"message": _("You can't update visibility of a team")})
18001814

18011815

18021816
if visibility == "public":
@@ -1824,22 +1838,12 @@ def validate_visibility(context, data_dict):
18241838

18251839
visibility = data_dict.get('visibility_type', "public")
18261840
owner_org = data_dict.get('owner_org', None)
1827-
id = data_dict.get('id', None)
1828-
if visibility in ["public", "internal"] and id:
1829-
package_show = get_action("package_show")(context, {"id": id})
1830-
id_org = package_show.get("owner_org", None)
1831-
if id_org:
1832-
org = get_action("organization_show")(context, {"id": id_org})
1833-
org_visibility = org.get("visibility", "public")
1834-
if org_visibility == "public":
1835-
raise ValidationError({"message": _("Organization has private visibility and cannot be made public")})
1836-
1837-
elif visibility in ["public", "internal"] and owner_org:
1841+
if visibility in ["public", "internal"] and owner_org:
18381842
org = get_action("organization_show")(context, {"id": owner_org})
18391843
org_visibility = org.get("visibility", "public")
18401844
if org_visibility == "private":
18411845
raise ValidationError({"message": _("Organization has private visibility and cannot create public datasets")})
1842-
1846+
18431847

18441848

18451849

ckan-backend-dev/src/ckanext-wri/ckanext/wri/logic/action/update.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,7 @@ def old_package_patch(context: Context, data_dict: DataDict) -> ActionResult.Pac
468468
You must be authorized to edit the dataset and the groups that it belongs
469469
to.
470470
"""
471+
validate_visibility(context, data_dict)
471472
_before_dataset_create_or_update(context, data_dict)
472473
_check_access("package_patch", context, data_dict)
473474

ckan-backend-dev/src/ckanext-wri/ckanext/wri/logic/auth/auth.py

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -105,12 +105,18 @@ def package_update(up_func, context, data_dict):
105105
if package.owner_org:
106106
# if there is an owner org then we must have update_dataset
107107
# permission for that organization
108-
if authz.users_role_for_group_or_org(package.owner_org, user) != "admin":
109-
return {
110-
"success": False,
111-
"msg": _("User %s not authorized to edit package %s")
112-
% (str(user), package.id),
113-
}
108+
if authz.users_role_for_group_or_org(package.owner_org, user) not in ["admin", "editor"]:
109+
if not (authz.has_user_permission_for_group_or_org(
110+
package.owner_org, user, "admin"
111+
) or authz.has_user_permission_for_group_or_org(
112+
package.owner_org, user, "editor"
113+
)):
114+
return {
115+
"success": False,
116+
"msg": _("User %s not authorized to edit package %s")
117+
% (str(user), package.id),
118+
}
119+
114120
else:
115121
if authz.check_config_permission("allow_dataset_collaborators"):
116122
# if org-level auth failed, check dataset-level auth

datapusher/main.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from tasks.sort_and_dedup import sort_and_dedup
2020
from tasks.validate_csv import validate_csv
2121
from tasks.data_to_file import data_to_file
22-
from tasks.s3_upload import s3_upload, s3_upload_zip
22+
from tasks.s3_upload import s3_upload
2323
from tasks.zip_files import download_keys, zip_files
2424

2525
from tasks.send_callback import send_callback
@@ -33,6 +33,8 @@
3333
"resource_update": "{ckan_url}/api/action/resource_patch",
3434
}
3535

36+
DEPLOYMENT_ENV = os.environ["FLOW_DEPLOYMENT_ENV"]
37+
3638

3739
@flow(log_prints=True)
3840
def push_to_datastore(resource_id, api_key):
@@ -269,7 +271,7 @@ async def download_resources_zipped(
269271
logger.info("Zipped data to {}".format(zipped_file))
270272
tmp_filepath = os.path.join(temp_dir, zipped_file)
271273
logger.info("Uploading data...")
272-
url = s3_upload_zip(
274+
url = s3_upload(
273275
tmp_filepath, "_downloads_cache/{}".format(f"{filename}.zip"), f"{download_filename}.zip"
274276
)
275277
send_callback(
@@ -311,6 +313,7 @@ async def download_resources_zipped(
311313
parameters={"resource_id": "test_id", "api_key": "api_key"},
312314
enforce_parameter_schema=False,
313315
is_schedule_active=False,
316+
tags=[DEPLOYMENT_ENV]
314317
)
315318
download_zipped_deployment = download_resources_zipped.to_deployment(
316319
name=config.get("DEPLOYMENT_NAME"),
@@ -324,6 +327,7 @@ async def download_resources_zipped(
324327
},
325328
enforce_parameter_schema=False,
326329
is_schedule_active=False,
330+
tags=[DEPLOYMENT_ENV]
327331
)
328332
conversion_deployment = convert_store_to_file.to_deployment(
329333
name=config.get("DEPLOYMENT_NAME"),
@@ -341,6 +345,7 @@ async def download_resources_zipped(
341345
},
342346
enforce_parameter_schema=False,
343347
is_schedule_active=False,
348+
tags=[DEPLOYMENT_ENV]
344349
)
345350
download_subset_deployment = download_subset_of_data.to_deployment(
346351
name=config.get("DEPLOYMENT_NAME"),
@@ -359,6 +364,7 @@ async def download_resources_zipped(
359364
},
360365
enforce_parameter_schema=False,
361366
is_schedule_active=False,
367+
tags=[DEPLOYMENT_ENV]
362368
)
363369
serve(
364370
datastore_deployment,

deployment/ckan/Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ RUN pip3 install -e 'git+https://github.com/ckan/ckanext-scheming.git@5ce30cf285
1414
pip3 install -r 'https://raw.githubusercontent.com/datopian/ckanext-s3filestore/wri/signed-url/dev-requirements.txt' && \
1515
pip3 install -e 'git+https://github.com/datopian/ckanext-auth.git@a9e42702b797eaf3ffe967040867519219d32224#egg=ckanext-auth' && \
1616
pip3 install -r 'https://raw.githubusercontent.com/datopian/ckanext-auth/okta/requirements.txt' && \
17-
pip3 install -e 'git+https://github.com/datopian/ckanext-hierarchy.git@wri#egg=ckanext-hierarchy' && \
17+
pip3 install -e 'git+https://github.com/datopian/ckanext-hierarchy.git@5d069a5d032ba384f43d266fc397a0aa0a4b444c#egg=ckanext-hierarchy' && \
1818
pip3 install -e 'git+https://github.com/datopian/ckanext-issues.git@ea2b3cbace924a162de009fd8e5626052ebc99e1#egg=ckanext-issues' && \
1919
# Required by ckanext-issues, but it's no longer included in any of the requirements files or the subdependencies
2020
pip3 install mock && \
@@ -34,6 +34,7 @@ RUN apk --update add build-base libxslt-dev python3-dev
3434
RUN apk update
3535
RUN apk add git=2.40.4-r0
3636

37+
3738
RUN pip install --force-reinstall -v "Pillow==11.0.0"
3839

3940
RUN apk add --virtual .build-deps \
@@ -92,6 +93,7 @@ RUN ckan config-tool ${CKAN_INI} "ckan.plugins = ${CKAN__PLUGINS}"
9293
RUN ckan config-tool ${CKAN_INI} "ckan.auth.create_user_via_web = false"
9394
RUN ckan config-tool ${CKAN_INI} "ckan.root_path = /private-admin/{{LANG}}"
9495
RUN ckan config-tool ${CKAN_INI} "ckan.plugins = ${CKAN__PLUGINS}"
96+
RUN ckan config-tool ${CKAN_INI} "ckan.auth.create_unowned_dataset = false"
9597

9698
RUN if [ "$GITHUB_ACTIONS" = "true" ]; then ckan config-tool ${CKAN_INI} "ckan.cors.origin_allow_all = True"; fi
9799

0 commit comments

Comments
 (0)