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 #5587] Set permissions for current user when DEFAULT_ANONYMOUS… #5588

Merged
merged 1 commit into from
Feb 3, 2020

Conversation

t-book
Copy link
Contributor

@t-book t-book commented Feb 1, 2020

This is a tiny but annoying problem. When we set DEFAULT_ANONYMOUS_VIEW_PERMISSION to False and some user does not add himself to the view select the layer will be broken. This small fix

  • adds the current user in case DEFAULT_ANONYMOUS_VIEW_PERMISSION is False
  • we're on the layer or document upload page.

Bildschirmfoto 2020-02-01 um 15 35 47

  • 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 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.

  • There is a ticket in https://github.com/GeoNode/geonode/issues describing the issue/improvement/feature (a notable exemptions 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 are 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

@cla-bot cla-bot bot added the cla-signed CLA Bot: community license agreement signed label Feb 1, 2020
@t-book t-book requested a review from afabiani February 1, 2020 14:37
@codecov
Copy link

codecov bot commented Feb 1, 2020

Codecov Report

Merging #5588 into master will decrease coverage by 0.45%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #5588      +/-   ##
==========================================
- Coverage   57.53%   57.08%   -0.46%     
==========================================
  Files         171      171              
  Lines       19526    19526              
  Branches     3196     3196              
==========================================
- Hits        11234    11146      -88     
- Misses       7283     7374      +91     
+ Partials     1009     1006       -3

@afabiani afabiani merged commit 8550d30 into master Feb 3, 2020
@afabiani afabiani deleted the t-book-patch-1 branch February 3, 2020 09:23
@afabiani afabiani modified the milestones: 3.0, 2.10.2 Feb 3, 2020
@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2020

The backport to 2.10.x failed:

The process 'git' failed with exit code 128

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-2.10.x 2.10.x
# Navigate to the new working tree
cd .worktrees/backport-2.10.x
# Create a new branch
git switch --create backport-5588-to-2.10.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick 8550d305aa9f36861e43a3b663437e0131e998cd
# Push it to GitHub
git push --set-upstream origin backport-5588-to-2.10.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.10.x

Then, create a pull request where the base branch is 2.10.x and the compare/head branch is backport-5588-to-2.10.x.

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.

2 participants