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

Server/OAPIF: fix unreported issue with access control layer permissions #57046

Merged
merged 1 commit into from
Apr 17, 2024

Conversation

elpaso
Copy link
Contributor

@elpaso elpaso commented Apr 4, 2024

When 'canRead' property for a published WFS layer was set to False from an access control filter plugin the whole /collections request was returning a 404 instead of returning the list of published layers (minus the filtered ones).

Funded by: Gis3W

@elpaso elpaso added Bug Either a bug report, or a bug fix. Let's hope for the latter! Server Related to QGIS server backport queued_ltr_backports Queued Backports backport release-3_36 labels Apr 4, 2024
Copy link

github-actions bot commented Apr 4, 2024

🪟 Windows builds ready!

Windows builds of this PR are available for testing here. Debug symbols for this build are available here.

(Built from commit 937e2e8)

@github-actions github-actions bot added this to the 3.38.0 milestone Apr 4, 2024
@elpaso elpaso closed this Apr 5, 2024
@elpaso elpaso reopened this Apr 5, 2024
@elpaso elpaso force-pushed the bugfix-server-oapif-layerpermissions branch from 937e2e8 to 187f532 Compare April 5, 2024 08:25
@nyalldawson
Copy link
Collaborator

@elpaso this needs a merge conflict fix now

When 'canRead' property for a published WFS layer was set to False
from an access control filter plugin the whole /collections reques
was returning a 404 insted of returning the list of published layers
(minus the filtered ones).
@elpaso elpaso force-pushed the bugfix-server-oapif-layerpermissions branch from 187f532 to f9688de Compare April 17, 2024 12:06
@elpaso elpaso enabled auto-merge April 17, 2024 12:08
@elpaso elpaso merged commit dd0412d into qgis:master Apr 17, 2024
30 checks passed
@qgis-bot
Copy link
Collaborator

The backport to queued_ltr_backports failed:

The process '/usr/bin/git' failed with exit code 1
stderr
error: could not apply f9688deeeff... Server/OAPIF: fix unreported issue with access control layer permissions
hint: After resolving the conflicts, mark them with
hint: "git add/rm <pathspec>", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".

stdout
Auto-merging src/server/services/wfs3/qgswfs3handlers.cpp
CONFLICT (content): Merge conflict in src/server/services/wfs3/qgswfs3handlers.cpp
Auto-merging tests/src/python/test_qgsserver_api.py

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-queued_ltr_backports queued_ltr_backports
# Navigate to the new working tree
cd .worktrees/backport-queued_ltr_backports
# Create a new branch
git switch --create backport-57046-to-queued_ltr_backports
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick f9688deeeff9bfd352b84e888af4df64af1f98b2
# Push it to GitHub
git push --set-upstream origin backport-57046-to-queued_ltr_backports
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-queued_ltr_backports

Then, create a pull request where the base branch is queued_ltr_backports and the compare/head branch is backport-57046-to-queued_ltr_backports.

@qgis-bot qgis-bot added the failed backport The automated backport attempt failed, needs a manual backport label Apr 17, 2024
@qgis-bot
Copy link
Collaborator

The backport to release-3_36 failed:

The process '/usr/bin/git' failed with exit code 1
stderr
error: could not apply f9688deeeff... Server/OAPIF: fix unreported issue with access control layer permissions
hint: After resolving the conflicts, mark them with
hint: "git add/rm <pathspec>", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".

stdout
Auto-merging src/server/services/wfs3/qgswfs3handlers.cpp
CONFLICT (content): Merge conflict in src/server/services/wfs3/qgswfs3handlers.cpp

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-release-3_36 release-3_36
# Navigate to the new working tree
cd .worktrees/backport-release-3_36
# Create a new branch
git switch --create backport-57046-to-release-3_36
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick f9688deeeff9bfd352b84e888af4df64af1f98b2
# Push it to GitHub
git push --set-upstream origin backport-57046-to-release-3_36
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-release-3_36

Then, create a pull request where the base branch is release-3_36 and the compare/head branch is backport-57046-to-release-3_36.

@elpaso elpaso deleted the bugfix-server-oapif-layerpermissions branch April 17, 2024 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport queued_ltr_backports Queued Backports Bug Either a bug report, or a bug fix. Let's hope for the latter! failed backport The automated backport attempt failed, needs a manual backport Server Related to QGIS server
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants