Add userinfo, permissions, wms handlers and async-execution polling#131
Open
mwallschlaeger wants to merge 1 commit into
Open
Add userinfo, permissions, wms handlers and async-execution polling#131mwallschlaeger wants to merge 1 commit into
mwallschlaeger wants to merge 1 commit into
Conversation
Adds the following features:
- GeonodeUserInfoHandler.get() — wraps /api/v2/userinfo, exposes the
identity claims plus the session access_token used downstream by
GeoServer.
- GeonodePermissionsHandler.{get,set,wait_for_completion} — wraps the
GET/PUT /api/v2/resources/{pk}/permissions endpoints. PUT is
asynchronous (returns execution_id + status_url); callers can poll the
execution to completion before relying on the new permission state.
- GeonodeWmsHandler.get_map() — issues WMS GetMap against the
GeoNode-managed GeoServer. Sends no auth header because GeoServer's
user realm rejects the Django Basic Auth credentials; the OAuth2
access_token query parameter (from /userinfo) is the credential.
- GeonodeExecutionRequestHandler.wait_for_completion(exec_id) — public
polling primitive shared by uploads, async deletes, and permission
changes. Raises GeoNodeRestException on `failed` or timeout.
- GeonodeResourceHandler.delete_async(pk) + wait_for_completion — the
async sibling of the existing synchronous delete; returns the
{status, execution_id, status_url} receipt so callers can confirm
removal before downstream assertions.
- GeonodeRest.http_put() — fills the missing verb so PUT-style endpoints
(permissions, future settings) can be hit without a custom requests
call.
- GeonodeRest.http_get_anonymous() — issues a GET with no session
credentials, returning the raw Response so callers can inspect 401/403
outcomes that are the expected result of a probe.
Also refactors the existing private GeonodeDatasetsHandler.__wait_for_upload__
to delegate to the new public wait_for_completion, removing the
duplicated polling loop.
Member
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the following features:
failedor timeout.Also refactors the existing private GeonodeDatasetsHandler.wait_for_upload to delegate to the new public wait_for_completion, removing the duplicated polling loop.
Description
A brief description of the feature or bug that this pull request addresses.
Type of Change
Please select the relevant option:
Related Issue
If there is an existing issue related to this pull request, please reference it here.
closes #
Checklist
Please ensure that your pull request meets the following requirements:
Additional Notes
Any additional information or context regarding the pull request can be provided here.
Thank you for creating this pull request