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 #12639] Adds all assigned group permissions to user #12640

Merged
merged 2 commits into from
Oct 18, 2024

Conversation

ridoo
Copy link
Contributor

@ridoo ridoo commented Oct 10, 2024

This is a quick proposal to ensure a user gets all permissions assigned, including custom permissions which are unknown to GeoNode but potentially created and needed by contrib apps.

See #12639 and #12635 for more details

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"
  • PR title must be in the form "[Fixes #<issue_number>] Title of the PR"
  • 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.

@ridoo ridoo requested a review from giohappy October 10, 2024 06:48
@cla-bot cla-bot bot added the cla-signed CLA Bot: community license agreement signed label Oct 10, 2024
@ridoo ridoo marked this pull request as draft October 10, 2024 06:50
@ridoo ridoo removed the request for review from giohappy October 10, 2024 06:50
@ridoo ridoo force-pushed the 12639_allow_user_defined_permissions branch from f9e05a7 to 17bc0b4 Compare October 10, 2024 10:44
@giohappy
Copy link
Contributor

@ridoo the test suite is failing but it doesn't seem related to your PR. Do you have time to check what's wrong?

@ridoo
Copy link
Contributor Author

ridoo commented Oct 12, 2024

@giohappy thanks for your review!

AFAICS the PR is on top of 'master' which seem to fail similarly:

https://app.circleci.com/pipelines/github/GeoNode/geonode/17373/workflows/b41015bd-12e7-4918-a767-01a918c53853

I was on sick leave yesterday and, unfortunately, will not have time to dig deeper into it next week (which is a short one for me due to upcoming vacation 🥳). I removed the draft status anyway.

@ridoo ridoo marked this pull request as ready for review October 12, 2024 07:16
@mattiagiupponi
Copy link
Contributor

Hey @ridoo if you merge master in your branch, the test failing unrelated tests should pass 😄

@ridoo ridoo force-pushed the 12639_allow_user_defined_permissions branch from 17bc0b4 to 33c05c9 Compare October 15, 2024 15:28
@ridoo
Copy link
Contributor Author

ridoo commented Oct 15, 2024

@mattiagiupponi thanks, should be ready to merge now

EDIT: Any chance to get it backported to v4.3.x?`:)

@giohappy
Copy link
Contributor

Any chance to get it backported to v4.3.x?`:)

@ridoo technically 4.3.x is not supported anymore now that we have 4.4.x. Can't you upgrade?

@ridoo
Copy link
Contributor Author

ridoo commented Oct 16, 2024

Will have to check. Project context, you know?! As there are some major changes I did not dig into yet, I am a bit hesitant. But could also be a chance to catch-up. You can do the merge without waiting on me.

@giohappy giohappy merged commit fbd853d into GeoNode:master Oct 18, 2024
17 checks passed
github-actions bot pushed a commit that referenced this pull request Oct 18, 2024
* Adds all assigned group permissions to user

* make set json serializable

(cherry picked from commit fbd853d)
giohappy pushed a commit that referenced this pull request Oct 18, 2024
…12660)

* Adds all assigned group permissions to user

* make set json serializable

(cherry picked from commit fbd853d)

Co-authored-by: Henning Bredel <881756+ridoo@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 4.4.x cla-signed CLA Bot: community license agreement signed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

User defined permissions will break the permissions exposed by the API
3 participants