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

Fix resource property in role library #763

Merged
merged 13 commits into from
Dec 18, 2023
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.3 - *2023-10-31*

## 11.8.2 - *2023-09-28*
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
Loading