Skip to content

Commit

Permalink
postgresql_grant: Remove TEMP privilege for database (#243)
Browse files Browse the repository at this point in the history
It's an alternative spelling for TEMPORARY. In pg_database, only TEMPORARY is saved so let's remove TEMP to keep the code simple and not having to manage this specific use case
  • Loading branch information
cyrilgdn authored Aug 26, 2022
1 parent e039204 commit cf204b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion postgresql/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ func sliceContainsStr(haystack []string, needle string) bool {
// allowedPrivileges is the list of privileges allowed per object types in Postgres.
// see: https://www.postgresql.org/docs/current/sql-grant.html
var allowedPrivileges = map[string][]string{
"database": {"ALL", "CREATE", "CONNECT", "TEMPORARY", "TEMP"},
"database": {"ALL", "CREATE", "CONNECT", "TEMPORARY"},
"table": {"ALL", "SELECT", "INSERT", "UPDATE", "DELETE", "TRUNCATE", "REFERENCES", "TRIGGER"},
"sequence": {"ALL", "USAGE", "SELECT", "UPDATE"},
"schema": {"ALL", "CREATE", "USAGE"},
Expand Down

0 comments on commit cf204b9

Please sign in to comment.