mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-13 17:23:02 -05:00
Fix effective permission column field (#2061)
* fix effective permission * Revert "fix effective permission" This reverts commit 5a97f108c640c7c2bfd22fe21852e880115ee7c9. * remove column info for may
This commit is contained in:
@@ -203,19 +203,21 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectManagement
|
|||||||
var dataModel = new EffectivePermissionsData(dataContainer);
|
var dataModel = new EffectivePermissionsData(dataContainer);
|
||||||
List<string> res = new List<string>();
|
List<string> res = new List<string>();
|
||||||
DataSet data = dataModel.QueryEffectivePermissions();
|
DataSet data = dataModel.QueryEffectivePermissions();
|
||||||
// STrace.Assert(data.Tables.Count == 1, "Unknown number of tables returned");
|
|
||||||
|
|
||||||
if (data.Tables.Count > 0)
|
if (data.Tables.Count > 0)
|
||||||
{
|
{
|
||||||
DataTable table = data.Tables[0];
|
DataTable table = data.Tables[0];
|
||||||
|
|
||||||
// STrace.Assert(table.Columns.Count >= 1 && table.Columns.Count <= 2, "Too many columns returned");
|
|
||||||
|
|
||||||
bool hasColumnInformation = dataModel.HasColumnInformation;
|
bool hasColumnInformation = dataModel.HasColumnInformation;
|
||||||
|
|
||||||
// loop through and add rows
|
// loop through and add rows
|
||||||
foreach (DataRow row in table.Rows)
|
foreach (DataRow row in table.Rows)
|
||||||
{
|
{
|
||||||
|
if (hasColumnInformation && !string.IsNullOrEmpty(row[1].ToString()))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
res.Add(row[0].ToString());
|
res.Add(row[0].ToString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user