Skip to content
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

[Fixes #10374] UUID resolver endpoint #10375

Merged

Conversation

autermann
Copy link
Contributor

@autermann autermann commented Dec 5, 2022

References: #10374

A new UI route (/catalogue/:uuid) has been defined that takes a UUID as a parameter. In the backend, a corresponding database query is triggered which, based on the available metadata of the layer, allows the user to be redirected to the actual URL.

Checklist

Reviewing is a process done by project maintainers, mostly on a volunteer basis. We try to keep the overhead as small as possible and appreciate if you help us to do so by completing the following items. Feel free to ask in a comment if you have troubles with any of them.

For all pull requests:

  • Confirm you have read the contribution guidelines
  • You have sent a Contribution Licence Agreement (CLA) as necessary (not required for small changes, e.g., fixing typos in the documentation)
  • Make sure the first PR targets the master branch, eventual backports will be managed later. This can be ignored if the PR is fixing an issue that only happens in a specific branch, but not in newer ones.

The following are required only for core and extension modules (they are welcomed, but not required, for contrib modules):

  • There is a ticket in https://github.com/GeoNode/geonode/issues describing the issue/improvement/feature (a notable exemption is, changes not visible to end-users)
  • The issue connected to the PR must have Labels and Milestone assigned
  • PR for bug fixes and small new features are presented as a single commit
  • Commit message must be in the form "[Fixes #<issue_number>] Title of the Issue"
  • New unit tests have been added covering the changes, unless there is an explanation on why the tests are not necessary/implemented
  • This PR passes all existing unit tests (test results will be reported by travis-ci after opening this PR)
  • This PR passes the QA checks: flake8 geonode
  • Commits changing the settings, UI, existing user workflows, or adding new functionality, need to include documentation updates
  • Commits adding new texts do use gettext and have updated .po / .mo files (without location infos)

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.

@cla-bot
Copy link

cla-bot bot commented Dec 5, 2022

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @autermann on file. In order for us to review and merge your code, please contact the project maintainers to get yourself added.

@cla-bot
Copy link

cla-bot bot commented Dec 5, 2022

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @autermann on file. In order for us to review and merge your code, please contact the project maintainers to get yourself added.

@codecov
Copy link

codecov bot commented Dec 5, 2022

Codecov Report

Merging #10375 (caad51b) into master (309cd88) will increase coverage by 0.03%.
The diff coverage is 100.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #10375      +/-   ##
==========================================
+ Coverage   61.92%   61.95%   +0.03%     
==========================================
  Files         827      827              
  Lines       50865    50900      +35     
  Branches     6549     6551       +2     
==========================================
+ Hits        31496    31534      +38     
+ Misses      17685    17683       -2     
+ Partials     1684     1683       -1     

geonode/catalogue/views.py Show resolved Hide resolved
@cla-bot
Copy link

cla-bot bot commented Dec 15, 2022

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @autermann on file. In order for us to review and merge your code, please contact the project maintainers to get yourself added.

@cla-bot
Copy link

cla-bot bot commented Dec 15, 2022

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @autermann on file. In order for us to review and merge your code, please contact the project maintainers to get yourself added.

@autermann
Copy link
Contributor Author

Existence and access permission checks are now delegated to geonode.utils.resolve_object.

The input is validated using the django path variable uuid/<uuid:uuid> which is basically a regex for a valid UUID.

Test cases now included.

@cla-bot
Copy link

cla-bot bot commented Dec 15, 2022

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @autermann on file. In order for us to review and merge your code, please contact the project maintainers to get yourself added.

@cla-bot
Copy link

cla-bot bot commented Dec 15, 2022

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @autermann on file. In order for us to review and merge your code, please contact the project maintainers to get yourself added.

@afabiani afabiani added this to the 4.0.2 milestone Dec 16, 2022
@afabiani afabiani merged commit d45c601 into GeoNode:master Dec 16, 2022
ridoo pushed a commit to Thuenen-GeoNode-Development/geonode that referenced this pull request Jan 12, 2023
ridoo added a commit to Thuenen-GeoNode-Development/geonode-mapstore-client that referenced this pull request Jan 16, 2023
The UUID link provides the user a more generic permalink (no database id
involved) which redirects to the resource, anyway.

Requires UUID resolver at the GeoNode backend.
see GeoNode/geonode#10375
ridoo added a commit to Thuenen-GeoNode-Development/geonode-mapstore-client that referenced this pull request Jan 16, 2023
The UUID link provides the user a more generic permalink (no database id
involved) which redirects to the resource, anyway.

Requires UUID resolver at the GeoNode backend.
see GeoNode/geonode#10375
ridoo added a commit to Thuenen-GeoNode-Development/geonode-mapstore-client that referenced this pull request Mar 24, 2023
The UUID link provides the user a more generic permalink (no database id
involved) which redirects to the resource, anyway.

Requires UUID resolver at the GeoNode backend.
see GeoNode/geonode#10375
ridoo added a commit to Thuenen-GeoNode-Development/geonode-mapstore-client that referenced this pull request Mar 24, 2023
The UUID link provides the user a more generic permalink (no database id
involved) which redirects to the resource, anyway.

Requires UUID resolver at the GeoNode backend.
see GeoNode/geonode#10375
ridoo added a commit to Thuenen-GeoNode-Development/geonode-mapstore-client that referenced this pull request Mar 24, 2023
The UUID link provides the user a more generic permalink (no database id
involved) which redirects to the resource, anyway.

Requires UUID resolver at the GeoNode backend.
see GeoNode/geonode#10375
ridoo added a commit to Thuenen-GeoNode-Development/geonode-mapstore-client that referenced this pull request Mar 24, 2023
The UUID link provides the user a more generic permalink (no database id
involved) which redirects to the resource, anyway.

Requires UUID resolver at the GeoNode backend.
see GeoNode/geonode#10375
ridoo added a commit to Thuenen-GeoNode-Development/geonode-mapstore-client that referenced this pull request Mar 24, 2023
The UUID link provides the user a more generic permalink (no database id
involved) which redirects to the resource, anyway.

Requires UUID resolver at the GeoNode backend.
see GeoNode/geonode#10375
allyoucanmap pushed a commit to GeoNode/geonode-mapstore-client that referenced this pull request Apr 11, 2023
The UUID link provides the user a more generic permalink (no database id
involved) which redirects to the resource, anyway.

Requires UUID resolver at the GeoNode backend.
see GeoNode/geonode#10375
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants