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

Check for USAGE (instead of MEMBER) privilege in all pg_has_role occurrences #1012

Merged

Conversation

RealGreenDragon
Copy link
Contributor

To work correctly Barman database user should be included in some roles ad this is checked by pg_has_role function.
In all pg_has_role functions MEMBER privilege is checked but in Barman code no SET ROLE is present so it better to check in pg_has_role functions USAGE privilege instead (that includes INHERIT check).

pg_has_role function documentation: https://www.postgresql.org/docs/16/functions-info.html#id-1.5.8.32.4.4.2.2.14.1.1.1

PR already discussed with @martinmarques here: EnterpriseDB/repmgr#807 (comment)

@martinmarques
Copy link
Contributor

The code itself looks good. I would like to see a better description in the commit message, something closer to what you put in the description of the PR. Usually, if the commit message is written in a way that has a line subject and description in subsequent paragraphs, GitHub creates the PR with the user not needing to intervene in any way.

@martinmarques
Copy link
Contributor

Oh, and you will likely need to rebase (don't think you'll find any conflicts as we have been only changing the GitHub actions)

@RealGreenDragon
Copy link
Contributor Author

@martinmarques Thanks for the advice, I will do it at next PRs. I also rebased the branch as requested.

@martinmarques
Copy link
Contributor

@RealGreenDragon you can amend the commit messages using git rebase --interactive

@RealGreenDragon
Copy link
Contributor Author

@martinmarques: commits squashed, but I see a linter fail (python so I thinks is not for my changes...)

@martinmarques
Copy link
Contributor

That linker error seems like something on our side.

@martinmarques
Copy link
Contributor

Seems we are testing python black and that'¡s failing. But it has to do with code that is not yours.

@martinmarques martinmarques merged commit 01e7230 into EnterpriseDB:master Oct 14, 2024
13 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants