mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-13 17:23:02 -05:00
Apply UI values regardless of add or edit code path (#1926)
This commit is contained in:
@@ -109,23 +109,23 @@ namespace Microsoft.SqlTools.ServiceLayer.Security
|
||||
this.isSchemaOwned = new Dictionary<string, bool>();
|
||||
this.isMember = new Dictionary<string, bool>();
|
||||
|
||||
// load user properties from SMO object
|
||||
if (!context.IsNewObject)
|
||||
{
|
||||
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.mappedLoginName = userInfo.LoginName;
|
||||
this.defaultSchemaName = userInfo.DefaultSchema;
|
||||
if (!string.IsNullOrEmpty(userInfo.Password))
|
||||
{
|
||||
this.password = DatabaseUtils.GetReadOnlySecureString(userInfo.Password);
|
||||
}
|
||||
}
|
||||
}
|
||||
this.password = DatabaseUtils.GetReadOnlySecureString(userInfo.Password);
|
||||
}
|
||||
}
|
||||
|
||||
this.LoadRoleMembership(context, userInfo);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user