[Fixes #14386] Replace Dataset does not keep in account the user perm…#14387
[Fixes #14386] Replace Dataset does not keep in account the user perm…#14387mattiagiupponi wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Code Review
This pull request improves the raster and vector upload handlers in GeoNode by adding permission checks for dataset replacement, handling GeoServer deletion failures gracefully, and preventing accidental schema deletion during rollback. The review feedback highlights critical issues, including a potential runtime crash in raster.py due to calling .exists() on a model instance, and a bug in vector.py where incorrect workspace matching during rollback could lead to data loss. Additionally, the reviewer noted that the permission checks are fragile due to substring matching on _to_compact_perms and identified several type hint mismatches.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
…issions
Checklist
For all pull requests:
The following are required only for core and extension modules (they are welcomed, but not required, for contrib modules):
Submitting the PR does not require you to check all items, but by the time it gets merged, they should be either satisfied or inapplicable.