mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-02-16 10:58:30 -05:00
Apply UI values regardless of add or edit code path (#1926)
This commit is contained in:
@@ -109,21 +109,21 @@ namespace Microsoft.SqlTools.ServiceLayer.Security
|
|||||||
this.isSchemaOwned = new Dictionary<string, bool>();
|
this.isSchemaOwned = new Dictionary<string, bool>();
|
||||||
this.isMember = new Dictionary<string, bool>();
|
this.isMember = new Dictionary<string, bool>();
|
||||||
|
|
||||||
|
// load user properties from SMO object
|
||||||
if (!context.IsNewObject)
|
if (!context.IsNewObject)
|
||||||
{
|
{
|
||||||
this.LoadUserData(context);
|
this.LoadUserData(context);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
|
// apply user properties provided by client
|
||||||
|
if (userInfo != null)
|
||||||
{
|
{
|
||||||
if (userInfo != null)
|
this.name = userInfo.Name;
|
||||||
|
this.mappedLoginName = userInfo.LoginName;
|
||||||
|
this.defaultSchemaName = userInfo.DefaultSchema;
|
||||||
|
if (!string.IsNullOrEmpty(userInfo.Password))
|
||||||
{
|
{
|
||||||
this.name = userInfo.Name;
|
this.password = DatabaseUtils.GetReadOnlySecureString(userInfo.Password);
|
||||||
this.mappedLoginName = userInfo.LoginName;
|
|
||||||
this.defaultSchemaName = userInfo.DefaultSchema;
|
|
||||||
if (!string.IsNullOrEmpty(userInfo.Password))
|
|
||||||
{
|
|
||||||
this.password = DatabaseUtils.GetReadOnlySecureString(userInfo.Password);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user