Skip to content

Commit

Permalink
Fix resource property in role library (sous-chefs#763)
Browse files Browse the repository at this point in the history
* Fix resource property in role library

Obvious fix

* add CHANGELOG and new version

Obvious fix

* Revert new version
Obvious fix

* Update actions/stale action to v9 (sous-chefs#764)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update changelog for 11.8.4

* Update metadata for 11.8.4

* Set Changelog to ## Unreleased

* Fix resource property in role library

Obvious fix

* Revert new version
Obvious fix

* Fix resource property in role library

Obvious fix

* Update changelog for 11.8.4

* Set Changelog to ## Unreleased

---------

Co-authored-by: Jakob Pfeiffer <jakob.pfeiffer@m-net.de>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Sous Chefs Bot <33356041+kitchen-porter@users.noreply.github.com>
  • Loading branch information
4 people authored and Justin-Fernbaugh committed Dec 20, 2023
1 parent 2d025f6 commit f6a07be
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ This file is used to list changes made in the last 3 major versions of the postg

## Unreleased

- Fix resource property in role library

## 11.8.4 - *2023-12-15*

- Fix installed_postgresql_* helper functions to maintain PG version consistency.
Expand Down
4 changes: 2 additions & 2 deletions libraries/sql/role.rb
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ def role_sql(new_resource)
sql.push("VALID UNTIL '#{new_resource.valid_until}'") if new_resource.valid_until

unless new_resource.action.eql?(:update)
sql.push("IN ROLE #{new_resource.role}") if new_resource.in_role
sql.push("IN ROLE #{new_resource.in_role}") if new_resource.in_role
sql.push("ROLE #{new_resource.role}") if new_resource.role
sql.push("ADMIN #{new_resource.role}") if new_resource.admin
sql.push("ADMIN #{new_resource.admin}") if new_resource.admin
end

"#{sql.join(' ').strip};"
Expand Down

0 comments on commit f6a07be

Please sign in to comment.