enable AAD auth for Table Designer (#1396)

This commit is contained in:
Alan Ren
2022-02-08 12:56:43 -08:00
committed by GitHub
parent 25bbbcf60e
commit 6b1b2720f2
6 changed files with 9 additions and 6 deletions

View File

@@ -4674,7 +4674,7 @@ The Query Processor estimates that implementing the following index could improv
<comment></comment>
</data>
<data name="ForeignKeyIsNotForReplicationDescription" xml:space="preserve">
<value>Enables or disables an IDENTITY constraint for data inserted by a replication process.</value>
<value>Enables or disables the constraint for data inserted by a replication process.</value>
<comment></comment>
</data>
<data name="SqlForeignKeyAction_NoAction" xml:space="preserve">

View File

@@ -2241,7 +2241,7 @@ TableColumnIdentitySeedPropertyDescription = Displays the initial row value for
TableDesignerIsEnabledPropertyTitle = Is Enabled
ForeignKeyIsEnabledDescription = Specifies whether the foreign key is Enabled
ForeignKeyIsNotForReplicationTitle = Not For Replication
ForeignKeyIsNotForReplicationDescription = Enables or disables an IDENTITY constraint for data inserted by a replication process.
ForeignKeyIsNotForReplicationDescription = Enables or disables the constraint for data inserted by a replication process.
SqlForeignKeyAction_NoAction = No Action
SqlForeignKeyAction_Cascade = Cascade
SqlForeignKeyAction_SetNull = Set Null

View File

@@ -5661,8 +5661,8 @@
<note></note>
</trans-unit>
<trans-unit id="ForeignKeyIsNotForReplicationDescription">
<source>Enables or disables an IDENTITY constraint for data inserted by a replication process.</source>
<target state="new">Enables or disables an IDENTITY constraint for data inserted by a replication process.</target>
<source>Enables or disables the constraint for data inserted by a replication process.</source>
<target state="new">Enables or disables the constraint for data inserted by a replication process.</target>
<note></note>
</trans-unit>
<trans-unit id="SqlForeignKeyAction_NoAction">

View File

@@ -23,5 +23,7 @@ namespace Microsoft.SqlTools.ServiceLayer.TableDesigner.Contracts
public string ConnectionString { get; set; }
public string Id { get; set; }
public string AccessToken { get; set; }
}
}

View File

@@ -515,6 +515,7 @@ namespace Microsoft.SqlTools.ServiceLayer.TableDesigner
tableViewModel.Name.Value = table.Name;
tableViewModel.Schema.Value = table.Schema;
tableViewModel.Description.Value = table.Description;
tableViewModel.Description.Enabled = false; // TODO: https://github.com/microsoft/azuredatastudio/issues/18247
foreach (var column in table.Columns.Items)
{
@@ -771,7 +772,7 @@ namespace Microsoft.SqlTools.ServiceLayer.TableDesigner
var connectinStringbuilder = new SqlConnectionStringBuilder(tableInfo.ConnectionString);
connectinStringbuilder.InitialCatalog = tableInfo.Database;
var connectionString = connectinStringbuilder.ToString();
var tableDesigner = new Dac.TableDesigner(connectionString, tableInfo.Schema, tableInfo.Name, tableInfo.IsNewTable);
var tableDesigner = new Dac.TableDesigner(connectionString, tableInfo.AccessToken, tableInfo.Schema, tableInfo.Name, tableInfo.IsNewTable);
this.idTableMap[tableInfo.Id] = tableDesigner;
return tableDesigner;
}