generated from crossplane/provider-template
-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
postgres: Expand grant privileges where required (#144)
* postgres: Expand grant privileges where required Inside postgresql, some privileges are altered[0] when issuing a `GRANT` - for example `ALL` is expanded to `CREATE, TEMPORARY, CONNECT`. When we observe the grant, we query privileges on the database to see if the ones in the grant exist. Given that they are expanded, we can't simply query for what the user gave us. Expand the privileges which need expanding before we make the query. Closes: #92 [0]: https://www.postgresql.org/docs/15/ddl-priv.html Signed-off-by: Iain Lane <[email protected]> * Sort the grants privileges before comparing them When we use them in the observation the order doesn't matter, but in the test we are generating a diff where it does, so compare them in the test. Signed-off-by: Iain Lane <[email protected]> --------- Signed-off-by: Iain Lane <[email protected]> Signed-off-by: Iain Lane <[email protected]> Signed-off-by: Timotej Avsec <[email protected]>
- Loading branch information
Showing
3 changed files
with
88 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters