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

Do not ignore column-restricted INSERT privileges #57810

Merged
merged 1 commit into from
Jul 15, 2024

Conversation

strk
Copy link
Contributor

@strk strk commented Jun 20, 2024

See GH-28835

@github-actions github-actions bot added this to the 3.38.0 milestone Jun 20, 2024
@strk
Copy link
Contributor Author

strk commented Jun 20, 2024

NOTE: based on PR GH-57802

@strk strk added Requires Tests! Waiting on the submitter to add unit tests before eligible for merging PostGIS data provider labels Jun 20, 2024
Copy link

github-actions bot commented Jun 20, 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 a244a19)

@qgis qgis deleted a comment from github-actions bot Jun 21, 2024
@nyalldawson nyalldawson reopened this Jun 21, 2024
@strk strk force-pushed the issue28835-pgcolumn-permissions branch from 8b93068 to e0c4a59 Compare June 22, 2024 13:57
@strk strk force-pushed the issue28835-pgcolumn-permissions branch 4 times, most recently from d1f0156 to 7c4c462 Compare June 25, 2024 06:51
@strk strk added Bug Either a bug report, or a bug fix. Let's hope for the latter! and removed Requires Tests! Waiting on the submitter to add unit tests before eligible for merging labels Jun 26, 2024
@strk strk marked this pull request as ready for review June 26, 2024 06:29
@strk
Copy link
Contributor Author

strk commented Jun 26, 2024

This is now ready for review and has unit test.
Writing the test revealed another bug (GH-57871) but fix of that one is not addressed by this PR, will file a separate one.

@strk strk force-pushed the issue28835-pgcolumn-permissions branch from 7c4c462 to a244a19 Compare June 26, 2024 10:22
Copy link

The QGIS project highly values your contribution and would love to see this work merged! Unfortunately this PR has not had any activity in the last 14 days and is being automatically marked as "stale". If you think this pull request should be merged, please check

  • that all unit tests are passing

  • that all comments by reviewers have been addressed

  • that there is enough information for reviewers, in particular

    • link to any issues which this pull request fixes

    • add a description of workflows which this pull request fixes

    • add screenshots if applicable

  • that you have written unit tests where possible
    In case you should have any uncertainty, please leave a comment and we will be happy to help you proceed with this pull request.
    If there is no further activity on this pull request, it will be closed in a week.

@github-actions github-actions bot added the stale Uh oh! Seems this work is abandoned, and the PR is about to close. label Jul 11, 2024
sql += QString( ",has_table_privilege(%1,'UPDATE')" // 5
",has_table_privilege(%1,'UPDATE')" ) // 6
.arg( quotedValue( mQuery ) );
sql += QString(
Copy link
Contributor

Choose a reason for hiding this comment

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

Maintaining PostgreSQL < 8.4 code paths looks like self inflicted pain at that point, given it has been long unsupported.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agreed. but it's better done in an ad-hoc PR

@github-actions github-actions bot removed the stale Uh oh! Seems this work is abandoned, and the PR is about to close. label Jul 13, 2024
@strk strk added the backport queued_ltr_backports Queued Backports label Jul 15, 2024
@strk strk merged commit d3474e4 into qgis:master Jul 15, 2024
33 checks passed
@strk strk deleted the issue28835-pgcolumn-permissions branch July 15, 2024 13:09
@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 a244a19d9f7... Fix editability of tables with column-limited insert privilege
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".
hint: Disable this message with "git config advice.mergeConflict false"

stdout
Auto-merging src/providers/postgres/qgspostgresprovider.cpp
CONFLICT (content): Merge conflict in src/providers/postgres/qgspostgresprovider.cpp
Auto-merging tests/src/python/test_provider_postgres.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-57810-to-queued_ltr_backports
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick a244a19d9f7b7fea580ca6bca413eb047479cbe0
# Push it to GitHub
git push --set-upstream origin backport-57810-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-57810-to-queued_ltr_backports.

@qgis-bot qgis-bot added the failed backport The automated backport attempt failed, needs a manual backport label Jul 15, 2024
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 PostGIS data provider
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants