From 70b3bcb1df2c3d0072071e21957e70064f392349 Mon Sep 17 00:00:00 2001 From: Travis Fields Date: Fri, 21 Aug 2015 11:44:20 -0700 Subject: [PATCH] (MODULES-2451) Fix issue with integer interpretations - Previously we would always get a string and was comparing it as a string with Puppet 4 we need to check out both --- templates/create/login.sql.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/create/login.sql.erb b/templates/create/login.sql.erb index 1670eb67..255f9c7e 100644 --- a/templates/create/login.sql.erb +++ b/templates/create/login.sql.erb @@ -16,7 +16,7 @@ BEGIN <% @svrroles.each do |role, enable_bit| -%> IF IS_SRVROLEMEMBER('<%= role %>','<%= @login %>') != <%= enable_bit %> BEGIN - <% if enable_bit == '1' -%> + <% if enable_bit == '1' || enable_bit == 1 -%> ALTER SERVER ROLE <%= role %> ADD MEMBER [<%= @login %>]; <% else -%> ALTER SERVER ROLE <%= role %> DROP MEMBER [<%= @login %>]; @@ -39,7 +39,7 @@ BEGIN DEFAULT_LANGUAGE = [<%= @default_language %>], DEFAULT_DATABASE = [<%= @default_database %>]; <% @svrroles.each do |role, enable_bit| -%> - <% if enable_bit == '1' -%> + <% if enable_bit == '1' || enable_bit == 1 -%> ALTER SERVER ROLE <%= role %> ADD MEMBER [<%= @login %>]; <% else -%> ALTER SERVER ROLE <%= role %> DROP MEMBER [<%= @login %>];