Skip to content

MODULES-11047 - Allow managing rights for PUBLIC role #1266

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

Merged
merged 1 commit into from
May 17, 2021

Conversation

mtancoigne
Copy link
Contributor

Following the feature request, this PR allow to use "PUBLIC" as a role for grants, which will not be quoted in the final query.

@puppet-community-rangefinder
Copy link

postgresql::server::grant is a type

Breaking changes to this file WILL impact these 1 modules (exact match):

This module is declared in 70 of 576 indexed public Puppetfiles.


These results were generated with Rangefinder, a tool that helps predict the downstream impact of breaking changes to elements used in Puppet modules. You can run this on the command line to get a full report.

Exact matches are those that we can positively identify via namespace and the declaring modules' metadata. Non-namespaced items, such as Puppet 3.x functions, will always be reported as near matches only.

@CLAassistant
Copy link

CLAassistant commented Apr 14, 2021

CLA assistant check
All committers have signed the CLA.

@mtancoigne mtancoigne force-pushed the revoke-public branch 2 times, most recently from 13bf91a to ebdde20 Compare April 14, 2021 10:32
@mtancoigne mtancoigne marked this pull request as ready for review April 16, 2021 07:15
@mtancoigne mtancoigne requested a review from a team as a code owner April 16, 2021 07:15
@sheenaajay sheenaajay self-assigned this Apr 26, 2021
@sheenaajay
Copy link
Contributor

Thank you @mtancoigne for your contribution.
Could you please let us know which postgresql version you are seeing this error when revoking / granting rights from PUBLIC role.
have you tried using the postgresql::server::grant
Example:
postgresql::server::grant { 'grant select on test_tbl': privilege => 'SELECT', object_type => 'TABLE', object_name => 'test_tbl', db => $db, role => $user, }

@mtancoigne
Copy link
Contributor Author

I tried on Postgres 12.6. I made the changes as I thought it was not supported by the module until I see the specific test on spec/unit/defines/server/grant_spec.rb: it checks for a quoted "PUBLIC" string, which is invalid (at least with tested version).

@adrianiurca
Copy link
Contributor

Hey @mtancoigne, we reproduced the problem locally and this fix is working properly.
I gonna proceed to merge this PR. Thank you for your great contribution!

kind regards,
@adrianiurca

@adrianiurca adrianiurca merged commit 91d04e8 into puppetlabs:main May 17, 2021
@mtancoigne mtancoigne deleted the revoke-public branch May 18, 2021 07:09
cegeka-jenkins pushed a commit to cegeka/puppet-postgresql that referenced this pull request Feb 3, 2022
MODULES-11047 - Allow managing rights for PUBLIC role
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants