diff --git a/CHANGELOG.md b/CHANGELOG.md index 44c3432c..61a18c50 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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* ## 11.8.3 - *2023-10-31* diff --git a/libraries/sql/role.rb b/libraries/sql/role.rb index 13ec225b..59dd83df 100644 --- a/libraries/sql/role.rb +++ b/libraries/sql/role.rb @@ -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};"