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 #10482] Upload ISO-19115 xml metadata via the API #10483

Merged
merged 8 commits into from
Jan 17, 2023

Conversation

ahmdthr
Copy link
Contributor

@ahmdthr ahmdthr commented Jan 2, 2023

References: #10482

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 Jan 2, 2023

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 @ahmdthr on file. In order for us to review and merge your code, please contact the project maintainers to get yourself added.

@ahmdthr
Copy link
Contributor Author

ahmdthr commented Jan 2, 2023

Related PR to the GeoNode documentation: GeoNode/documentation#267

@cla-bot
Copy link

cla-bot bot commented Jan 4, 2023

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 @ahmdthr 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 Jan 4, 2023

Codecov Report

Merging #10483 (8673d08) into master (7e25f1c) will increase coverage by 0.09%.
The diff coverage is 93.18%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #10483      +/-   ##
==========================================
+ Coverage   61.98%   62.08%   +0.09%     
==========================================
  Files         827      827              
  Lines       50952    51081     +129     
  Branches     6556     6561       +5     
==========================================
+ Hits        31585    31714     +129     
  Misses      17684    17684              
  Partials     1683     1683              

@cla-bot
Copy link

cla-bot bot commented Jan 12, 2023

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 @ahmdthr on file. In order for us to review and merge your code, please contact the project maintainers to get yourself added.

@afabiani
Copy link
Member

Dear @ahmdthr thank you for your Pull Request.

In order to be able to merge this one we need few things:

  1. You sign the CLA and send to OSGEO, whenever you have done this, please let us know so we can update the clabot and make your PR valid
  2. Create an issue explaining what you want to achieve and reference this one into the PR title

Thank you for your support!

@ahmdthr
Copy link
Contributor Author

ahmdthr commented Jan 12, 2023

Dear @ahmdthr thank you for your Pull Request.

In order to be able to merge this one we need few things:

  1. You sign the CLA and send to OSGEO, whenever you have done this, please let us know so we can update the clabot and make your PR valid
  2. Create an issue explaining what you want to achieve and reference this one into the PR title

Thank you for your support!

Hi,

1- I have sign the CLA and sent it to OSGEO already and I got the confirmation that my name has been added to the database.
2- The related issue is (#10482). I apologize, I thought I already have referenced the issue.

I hope now my PR can be merged. Thank you very much. Best regards.

@afabiani
Copy link
Member

@ahmdthr very well, thanks so much. I'll take care of updating both the clabot and the PR links.

@cla-bot cla-bot bot added the cla-signed CLA Bot: community license agreement signed label Jan 12, 2023
@afabiani afabiani changed the title ISO-19115 XML metadata file can be uploaded via the API [Fixes #10482] Upload ISO-19115 xml metadata via the API Jan 12, 2023
@afabiani afabiani added this to the 4.1.0 milestone Jan 12, 2023
Copy link
Member

@afabiani afabiani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So far so good, but we are missing the permissions checks on the resource.

The @action should contain a permission_classes list like the following one (and the tests should prove this is actually working):

permission_classes=[
            IsAuthenticated, UserHasPerms(
                perms_dict={
                    "default": {
                        "PUT": ['base.change_resourcebase_metadata']
                    }
                }
            )
        ])

@ahmdthr ahmdthr requested a review from afabiani January 17, 2023 09:37
@afabiani afabiani merged commit 153736b into GeoNode:master Jan 17, 2023
github-actions bot pushed a commit that referenced this pull request Jan 17, 2023
* ISO-19115 xml metadata file can be uploaded via the API

* Small changes for PEP8 compliance

* Added tests for checking permissions for metadata upload

Co-authored-by: Alessio Fabiani <[email protected]>
(cherry picked from commit 153736b)
afabiani pushed a commit that referenced this pull request Jan 17, 2023
…0548)

* ISO-19115 xml metadata file can be uploaded via the API

* Small changes for PEP8 compliance

* Added tests for checking permissions for metadata upload

Co-authored-by: Alessio Fabiani <[email protected]>
(cherry picked from commit 153736b)

Co-authored-by: ahmdthr <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 4.1.x cla-signed CLA Bot: community license agreement signed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants