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 #ISSUE_11995] GNIP 99: Implement a CRUD REST API for users #12072

Merged
merged 8 commits into from
Mar 21, 2024

Conversation

mattiagiupponi
Copy link
Contributor

@mattiagiupponi mattiagiupponi commented Mar 20, 2024

Implementation of the user CRUD api described in #11995
cc: @RegisSinjari

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: black geonode && 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.

mattiagiupponi and others added 4 commits March 7, 2024 10:34
* [Fixes #11995] Implement POST and PATCH methods for the User API
* Upgrare Remote Docker for CircleCI
* [Fixes #11995] Implement POST and PATCH methods for the User API, refactored validation in serializer

---------

Co-authored-by: RegisSinjari <[email protected]>
Co-authored-by: Giovanni Allegri <[email protected]>
* [Fixes #11995] Implement the DELETE method for the User API

* [Fixes #11995] Implement the DELETE method for the User API refactor and docstrings added
* [Fixes #11995] Implement endpoint to transfer ownership
…12066)

* [FIXES #11995] Implement endpoint to unregister as a project manager

* [FIXES #11995] Implement endpoint to unregister as a project managergroup.group_id

* [FIXES #11995] Implement endpoint to unregister as a project manager,tests added
@cla-bot cla-bot bot added the cla-signed CLA Bot: community license agreement signed label Mar 20, 2024
Copy link

gitguardian bot commented Mar 20, 2024

⚠️ GitGuardian has uncovered 4 secrets following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secrets in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
9702486 Triggered Generic Password a411232 geonode/people/tests.py View secret
9702486 Triggered Generic Password a411232 geonode/people/tests.py View secret
9768717 Triggered Username Password a411232 geonode/people/tests.py View secret
9705160 Triggered Username Password a411232 geonode/base/api/tests.py View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secrets safely. Learn here the best practices.
  3. Revoke and rotate these secrets.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

Our GitHub checks need improvements? Share your feedbacks!

@mattiagiupponi
Copy link
Contributor Author

Doc PR provided by @RegisSinjari available GeoNode/documentation#302

@mattiagiupponi mattiagiupponi linked an issue Mar 20, 2024 that may be closed by this pull request
5 tasks
@mattiagiupponi mattiagiupponi added this to the 4.3.0 milestone Mar 20, 2024
@giohappy
Copy link
Contributor

@RegisSinjari please check the failing test

Copy link

codecov bot commented Mar 21, 2024

Codecov Report

Merging #12072 (f559c65) into master (023761d) will increase coverage by 0.36%.
Report is 33 commits behind head on master.
The diff coverage is 99.80%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #12072      +/-   ##
==========================================
+ Coverage   63.67%   64.04%   +0.36%     
==========================================
  Files         867      867              
  Lines       52664    53173     +509     
  Branches     6600     6650      +50     
==========================================
+ Hits        33535    34053     +518     
+ Misses      17610    17591      -19     
- Partials     1519     1529      +10     

geonode/people/utils.py Outdated Show resolved Hide resolved
geonode/people/views.py Outdated Show resolved Hide resolved
@giohappy giohappy self-requested a review March 21, 2024 15:33
@giohappy giohappy merged commit 9e39774 into master Mar 21, 2024
8 of 14 checks passed
@giohappy giohappy deleted the ISSUE_11995 branch March 21, 2024 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed CLA Bot: community license agreement signed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GNIP 99: Implement a CRUD REST API for users
3 participants