mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-02-16 10:58:30 -05:00
Fix updating users in SQL DB (#1924)
This commit is contained in:
@@ -12,6 +12,7 @@ using Microsoft.SqlServer.Management.Sdk.Sfc;
|
|||||||
using Microsoft.SqlTools.ServiceLayer.Management;
|
using Microsoft.SqlTools.ServiceLayer.Management;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Security.Contracts;
|
using Microsoft.SqlTools.ServiceLayer.Security.Contracts;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Utility;
|
using Microsoft.SqlTools.ServiceLayer.Utility;
|
||||||
|
using Microsoft.SqlServer.Management.Common;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Security
|
namespace Microsoft.SqlTools.ServiceLayer.Security
|
||||||
{
|
{
|
||||||
@@ -237,8 +238,13 @@ namespace Microsoft.SqlTools.ServiceLayer.Security
|
|||||||
if (SqlMgmtUtils.IsSql11OrLater(context.Server.ServerVersion))
|
if (SqlMgmtUtils.IsSql11OrLater(context.Server.ServerVersion))
|
||||||
{
|
{
|
||||||
this.authenticationType = existingUser.AuthenticationType;
|
this.authenticationType = existingUser.AuthenticationType;
|
||||||
this.defaultLanguageAlias = LanguageUtils.GetLanguageAliasFromName(existingUser.Parent.Parent,
|
|
||||||
existingUser.DefaultLanguage.Name);
|
if (context.Server.ServerType != DatabaseEngineType.SqlAzureDatabase)
|
||||||
|
{
|
||||||
|
this.defaultLanguageAlias = LanguageUtils.GetLanguageAliasFromName(
|
||||||
|
existingUser.Parent.Parent,
|
||||||
|
existingUser.DefaultLanguage.Name);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -793,7 +799,8 @@ namespace Microsoft.SqlTools.ServiceLayer.Security
|
|||||||
get
|
get
|
||||||
{
|
{
|
||||||
//Default Language was not supported before Denali.
|
//Default Language was not supported before Denali.
|
||||||
return SqlMgmtUtils.IsSql11OrLater(this.context.Server.ConnectionContext.ServerVersion);
|
return SqlMgmtUtils.IsSql11OrLater(this.context.Server.ConnectionContext.ServerVersion)
|
||||||
|
&& this.context.Server.ServerType != DatabaseEngineType.SqlAzureDatabase;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user