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

[Backport 3.2.x][Fixes #7355] Introduce the adoption of groups to define users permissions, and define add_resource permission for users #7451

Conversation

marthamareal
Copy link
Contributor

@marthamareal marthamareal commented May 3, 2021

  • Creates a new user group contributors with permission base_addresourcebase.
  • Updates existing users to belong to a new contributors group.
  • Includes user's group perms to get_user_perms function

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 cla-bot bot added the cla-signed CLA Bot: community license agreement signed label May 3, 2021
@giohappy giohappy self-requested a review May 3, 2021 09:17
@marthamareal marthamareal self-assigned this May 3, 2021
@lgtm-com
Copy link

lgtm-com bot commented May 3, 2021

This pull request introduces 1 alert when merging 7f76821 into 6495e9f - view on LGTM.com

new alerts:

  • 1 for Unused import

@afabiani
Copy link
Member

afabiani commented May 3, 2021

@marthamareal LGTM complains about a new unused import introduced with this PR, please, take a look. Thanks.

@marthamareal marthamareal force-pushed the set-add_resourcebase-perm-to-users-backport branch 2 times, most recently from 627e602 to 3fe0e32 Compare May 3, 2021 20:15
@giohappy giohappy self-requested a review May 4, 2021 08:08
Copy link
Contributor

@giohappy giohappy left a comment

Choose a reason for hiding this comment

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

@marthamareal let's use lowercase for GeoNode permission names, so please change ADD_RESOURCE to add_resource.

- Assign users to contributors group by default
@marthamareal marthamareal force-pushed the set-add_resourcebase-perm-to-users-backport branch from 3fe0e32 to d196226 Compare May 4, 2021 08:19
@marthamareal marthamareal requested a review from giohappy May 4, 2021 08:20
@giohappy giohappy changed the title [Backport 3.2.x][Fixes #7355] Introduce the adoption of groups to define users permissions, and define ADD_RESOURCE permission for users [Backport 3.2.x][Fixes #7355] Introduce the adoption of groups to define users permissions, and define add_resource permission for users May 4, 2021
afabiani added 3 commits May 4, 2021 16:51
…s are assigned only when the user is actually created

(cherry picked from commit e7addda)
(cherry picked from commit d037ba3)
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.

3 participants